SlickEdit Product Discussion > SlickEdit®

Python debugging

(1/2) > >>

jporkkahtc:
Is there a way to debug a python script when a workspace is loaded?

I normally have a big workspace loaded, mostly java code.
I occasionally write little python scripts - it would be really handy to be able to debug them without creating a project or closing down my current workspace - just start debugging the current *.py file.

patrick:
Currently, there isn't a way to force that.  Two big things the debug support relies on are associated with the open project: the debug method (jdwp, pydbgp, etc...) and the actual target named "debug" in the project.

It might be possible to add the ability to do it in the future.  I'd guess it wouldn't be hooked into F5, but you'd have to run some command or menu item explicitly that says "Just debug this script file".

Dennis:
You might be able to use Debug > Attach Debugger > Attach to pydbgp...

jporkkahtc:
Maybe, but as I remember this is a PITA to do it that way.

MSFT Visual Studio Code: You can setup multiple configurations.
Each configuration identifies the type (python, js, others?)
The path to the script to debug.
The Arguments to use when starting the script.
etc.


This is a *much* better way that Slick currently has.

I have to do Build->Python Options and set the correct version of Python to use.

Then to edit the script arguments I can set them in Project Properties, where the arguments are mixed in with stuff necessary for Slick

--- Code: ---%(SLICKEDIT_PYTHON_EXECUTE_ARGS) "%f" %~other ....My args go here ...
--- End code ---
Or use Debug->Start with Arguments.

But, then I also have to be careful to set the correct *.py file as the current file or I start debugging in some random library *.py file from the last debug session.

Overall, a lot less than ideal.

Clark:
We're always trying to figure out ways to simplify things. There's definitely room for improvement.

This could be a dumb question. I added two configurations to Visual Studio Code after opening a folder. How do you choose which one configuration is active? I ended up deleting one to debug with the configuration I wanted. I'm sure there's a better way but how?

Navigation

[0] Message Index

[#] Next page

Go to full version