Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

SciTE4AutoHotKeys v3.0.04 - Debug currently running script not available


  • Please log in to reply
5 replies to this topic
MJD
  • Members
  • 3 posts
  • Last active: Aug 25 2013 03:17 PM
  • Joined: 24 Aug 2013

I have always had some issues with launching a script with debugger ( F7 ) with large program with many complex objects.  In all previous versions I was able to launch the script without debug on ( F5 ) and then after it was running then Ctrl+Shft+F7 to get the debugger working reliably.  In this latest version Ctrl+Shft+F7 does not work any longer ( i.e. nothing happens ).  I no longer have the zip files for previous version where this was working I think v3.0.02 which also had the brace highlighting which has been very helpful.

 

Is there any way to get the older version back or allow Ctrl+Shft+F7 to work again ?

 

Thanks

Mike D.



fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
Such thing has never been possible, because the Run command waits until AutoHotkey finishes and does not let you run any other commands at the same time. You may want to use Quick run (Ctrl+Shift+F5) (in fact, it was added precisely because of the debug a currently running script feature). Additionally you may want to directly start the script with the debugger (F7).

Brace highlighting was fixed in v3.0.02 and has stayed fixed since then (tested right now by me).

MJD
  • Members
  • 3 posts
  • Last active: Aug 25 2013 03:17 PM
  • Joined: 24 Aug 2013

F7 does not work reliably for large scripts with complex objects ( at least that has been my experience using AHK ANSI 32 bit with XPsp3, Win7 and Win8  ).  Menu selection "Tools" -> "Debug a currently running script" has been disabled  once a script is running but  Ctrl+Shft+F7 still worked in v3.0.02 and was very reliable.  I just tried using "Tools" -> "Quick run" and Ctrl+Shft+F5 but both fail to run my script saying it cannot open an  #Include file however the script runs fine normally using F5 so AHK is definitely finding the #Include file.

 

Is it possible to get SciTE4AutoHotKeys v3.0.02 which worked very well for me ?

 

Thanks

Mike D.



fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007

F7 does not work reliably for large scripts with complex objects

Both the normal debugging and the "Debug a currently running script" command use the same exact engine, so there should be no difference whatsoever. Which symptoms are you having? Can you post a test case?

Menu selection "Tools" -> "Debug a currently running script" has been disabled once a script is running but Ctrl+Shft+F7 still worked

That's something that should have never been possible and was apparently fixed in vanilla SciTE.

I just tried using "Tools" -> "Quick run" and Ctrl+Shft+F5 but both fail to run my script saying it cannot open an #Include file however the script runs fine normally using F5 so AHK is definitely finding the #Include file.

That may happen because your script is relying on the working directory (which is the default for #include) being the same as the script directory (and in many cases they aren't, regardless of using 'Run' or 'Quick run'). Put this at the beginning of the script, before any other includes; in order to change the default #include directory:
#include %A_ScriptDir%
Also, you may want to use the local StdLib folder (%A_ScriptDir%\Lib) instead of #includes, which is cleaner.
PS: it's called SciTE4AutoHotkey, not the lowercase 'k' and no 's' at the end.

MJD
  • Members
  • 3 posts
  • Last active: Aug 25 2013 03:17 PM
  • Joined: 24 Aug 2013

Adding the statement #include %A_ScriptDir% at the beginning corrected the "Quick run" error and it now works which allows the "Debug a currently running script" to be enabled which gets me back the functionality I needed. 

 

There is definitely a reliability difference between F7 and Ctrl+Shift+F7 for me. Using F7 sometimes work but eventually leads to an AHK ANSI 32 error which forces you to close .... restarting AHK at this point does not correct the problem as it just keep recurring.  Sometimes if you reboot F7 will work again for a period of time but eventually leads to the AHK ANSI 32 error again.  I never experience this problem using Ctrl+Shift+F7.

 

Thanks for your help !

Mike D.



fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
If it's the script that crashes it may be a bug in AutoHotkey itself (assuming you hit 'Run' after the debugger pops in in order to start the script). Still, you should post a test case here for people to test.