First time here? Check out the FAQ!
1

python -m wingdbstub cmd options

  • retag add tags

hi all,

it would be useful if

"python -m wingdbstub cmd options"

would start "cmd" with given options, so that it can be attached by the IDE and debugged; w/o the need for altering the source code.

regards

a.

A Mennucc's avatar
21
A Mennucc
asked 2025-10-14 01:52:53 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

1

dear Wing, thanks for the heads-up. I am using wingdb ; I noted a shortcoming : by default it tries to execute the script using python , but python is not a command nowadays in Debian. So I conjured this version (with the help of an AI agent) that , when called as wingdb script

  • if WINGDB_PYTHON is defined, uses that; otherwise
  • scans the firse line of the script, and if there is a shebang deduces the correct version of python from it e.g.
    • #!/usr/bin/env python3python3
    • #!/usr/bin/env python3 -X mempython3 -X mem
    • #!/usr/bin/python3 -X thatpython3 -X that and so on
  • if the above fails, then sets WINGDB_PYTHON=python?? looking for an existing version of python

here is the script

A Mennucc's avatar
21
A Mennucc
answered 2025-11-14 02:18:16 -0600
edit flag offensive 0 remove flag delete link

Comments

Thanks for posting that. Yes, at this point in many cases you have to define WINGDB_PYTHON. We should possibly change the default at some point but since that's an incompatible and possibly also problematic change we've avoided it. I guess expecting WINGDB_PYTHON to be set is an example of "explicit is better than implicit". :-) Thanks again!

Wingware Support's avatar Wingware Support (2025-11-14 08:45:38 -0600) edit
add a comment see more comments
0

You can do that with 'wingdb' as described in https://wingware.com/doc/debug/wingdb

Wingware Support's avatar
4.3k
Wingware Support
answered 2025-10-14 13:33:39 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer