SlickEdit Community

Archived Read Only Forums => SlickEdit 2020 v25 Beta Discussion => Topic started by: Exolon on September 16, 2020, 11:55:51 am

Title: Quick way to attach to PTVSD?
Post by: Exolon on September 16, 2020, 11:55:51 am
Hi,

I'm currently using v25 to remote debug a Flask project. After every code change, I have to restart the service in my LXD container and then reattach SE via
Code: [Select]
Debug->Attach Debugger->Attach To Python menu.

Is there a faster way to attach to the debug client? I found no debug-attach-ptvsd command in the command line.

Thanks

Mike

Title: Re: Quick way to attach to PTVSD?
Post by: patrick on September 16, 2020, 01:53:46 pm
If you don't want to have to bring up the dialog, you'd have to resort to using a macro.  There isn't a command to repeat the last debug session without prompting, though that does sound like it would be a helpful addition.  I'm not sure how much that will involve, I'll put it on my list to take a look at.

The attached source file provides a 'example_debug_attach' command whose parameters can be changed for the remote host, port and workspace name.  If you edit that, go to the SlickEdit command line and type "load testfile.e", you can bind that example_debug_attach command to a key, or just run it on the SlickEdit command line.

Title: Re: Quick way to attach to PTVSD?
Post by: Exolon on September 24, 2020, 11:40:11 am
Thanks a lot for the macro.

I changed host, port and workspace, but unfortunately only get a 'Error initializing debugger: Error code out of range: 1'

Any idea?

Thanks

Mike
Title: Re: Quick way to attach to PTVSD?
Post by: patrick on September 24, 2020, 01:01:32 pm
Odd error code.  At the SlickEdit command line, type in "set-var def-debug-logging 2", and retry the macro, and then "set-var def-debug-logging 0". 

In your configuration directory, under 25.0.0/logs there will be a debug.log and dapcom.log, send those along.  That should give me an idea of where the error happened.
Title: Re: Quick way to attach to PTVSD?
Post by: Exolon on September 24, 2020, 01:29:46 pm
I did, but the log file is not touched.

If I log a GUI connect I get log entries.

???

- Mike
Title: Re: Quick way to attach to PTVSD?
Post by: patrick on September 24, 2020, 02:06:37 pm
Odd.  I can get that too now.

Try with the attached testfile.e, after you update it's parameters. 
Title: Re: Quick way to attach to PTVSD?
Post by: Exolon on September 24, 2020, 02:16:27 pm
Ah, yes, now it is working.

Thank you. Very appreciated.

- Mike