Notepad++ Debugger

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Notepad++ Debugger

26 Dec 2019, 16:05

I'm trying to setup a debugger for Notepad++/AutoHotkey on my work computer.

I use AutoHotkey at work, however I am not permitted to run any commands that require administrator privileges. I use a lot of portable apps to bypass this restriction.

I have AutoHotkey and Notepad++ both extracted to separate folders, and I'm trying to use the DBGp plugin for Notepad++ but I don't know what I'm doing.

Can someone please help me get a debugger working in Notepad++? Thanks!

I have chosen the AutoHotkey.exe file as the default "Open With..." application to run ".ahk" script files with executed.

I've also installed the DBGp plugin for Notepad++.

I don't know what I'm supposed to do to enable the debugging. I use the "RunMe" plugin usually to run the script from Notepad++ with the default application with a click of a button.

Until now, I always use MsgBox, ToolTip, etc for my debugging purposes, but would like to finally start using a debugger tool.
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 16:36

I just posted a few days ago my AHK Project Manager in the script section of this Forum. It makes use of the debug plugin of npp.
You may try it.
Besides that you could also just run AHK with the /debug option. Then it should automatically connect with the DBGp within NPP.
ciao
toralf
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Notepad++ Debugger

26 Dec 2019, 16:40

When I try to launch AutoHotkey.exe /Debug the AutoHotkey.chm file is launched and the debugger is still not connecting.
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 16:46

You need to add your script as well
ciao
toralf
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Notepad++ Debugger

26 Dec 2019, 16:55

That shows the AutoHotkey icon in the tray/notification area. It refuses to show a menu on right-click.

Reloading the script with #SingleInstance, Force results in error Could not close the previous instance of this script. Keep waiting?

I have to close the process from the task manager.

No luck. :( Not detecting the debugger in Notepad++.

Also, every time I run the plugin I get this message:

Code: Select all

---------------------------
PluginsManager::runPluginCommand Exception
---------------------------
Unlisted exception
---------------------------
OK   
---------------------------

It does not work.
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 17:06

What npp and dbgp versions do you use?
ciao
toralf
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 17:08

Please try a very simple script that will run for sure, e.g. only 3 lines with message boxes and a few variables
ciao
toralf
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 17:09

Npp has to be 32 bit I believe for some plugins to work. IIRC DBGp is one of them.
ciao
toralf
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Notepad++ Debugger

26 Dec 2019, 17:10

AutoHotkey 1.1.32.00 (32-bit)
DBGp 0.0.13.27
Notepad++ 7.7.1 (32-bit)

Code: Select all

#SingleInstance, Force
#Persistent

OutputDebug, Testing...
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 17:13

Do not use ouputdebug.
Just msg box
And what are your settings for DBGp?
ciao
toralf
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 17:17

I have npp 7.8.2 but I have been using older versions as well with dbgp.
How did you install dbgp?
Maybe start installation of npp and dbgp from scratch again.
ciao
toralf
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Notepad++ Debugger

26 Dec 2019, 17:18

CommandLine Example: "C:\Users\Username\...\AutoHotkey\AutoHotkey.exe" /Debug "C:\Users\Username\Downloads\New AutoHotkey Script.ahk"

Code: Select all

#SingleInstance, Force
#Persistent

MsgBox, Testing...
I downloaded the latest version of N++ portable and installed the plugin again using the built-in plugin manager and same issue...

DBGp settings attached.
Untitled.png
DBGp Settings Window
(7.99 KiB) Downloaded 176 times
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 17:21

You either have to set a break point in the script or check break on first line
ciao
toralf
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Debugger

26 Dec 2019, 17:31

I”m off now, good luck .
I”LL check back tomorrow
ciao
toralf
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Notepad++ Debugger

27 Dec 2019, 12:19

The problem seems to be the AutoHotkey executable.

Whenever I attempt to launch the script AutoHotkey.exe /Debug YourScript.ahk, the icon appears in the notification/tray area and it's not possible to interact with the icon. The program is crashed possible and I must manually exit from the task manager.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: rc76 and 206 guests