@PeterJones
It all sounded so logical to me when I wrote it, but now that I’m reading it again, I have to agree with you—
that wasn’t my best explanation of how this is supposed to work. Thanks for clarifying, and yes,
Prefer installed Python libraries and a local Python installation are necessary in this scenario.
Regarding sys.path, yes, that makes sense. I should have tested all of this in a sandbox; then I would have noticed how
my own setup differs from a standard installation.
And yes, the procedure, which is ONLY necessary to debug PythonScript scripts, is that you have one Npp instance,
in which the script is debugged—let’s call it instance A—and another, let’s call this instance B,
in which the script to be debugged actually runs.
So, Instance A starts the debugging session via Plugins->NppDebugger->Start.
This results in a new Npp instance B being launched.
Now, in Instance B, the script that configures debugpy must be started.
This causes debugpy to launch another Python process pydevd which is the real python debugger.
This means that NppDebugger, from Npp instance A, waits for debugpy in Npp instance B to start the
Python debugger pydevd AND for debugpy to start a TCP server to which NppDebugger can then connect.
NppDebugger(tcp client) <-> debugy(tcp server) <-intern-> debugy(tcp client) <-> pydevd(tcp server)
As soon as NppDebugger establishes a connection, it begins communicating with debugpy via DAP messages.
Is the long-term plan …
Yes, ultimately, the plugin should be designed to minimize the need for manual configuration editing.
For debuggers that work with compiled source code, such as gdb, delve, lldb, etc.,
this is usually a project-specific setting and something that a user must set at least once per project.
I don’t see how the plugin could figure this out on its own.
For PythonScript debugging, a simple variable substitution, as you mentioned, seems sufficient.
@Lycan-Thrope said:
They have a Trial Version
If I find the time, I’ll give it a try… but that might take a while… :)
@Lycan-Thrope said:
What the heck, …
:D - thank you :D