$attach command unavailable in Standard REPL/immediat
See original GitHub issueEnvironment data
- PTVS version: 15.7.18156.1-15.0
- OS and version: Windows 10 (v1803 build 17134.167)
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.6
- Visual Studio 2017 (15.7.6)
Actual behavior
In the interactive window the $attach
command is not available:
Expected behavior
The $attach
command should be available and attach the debugger
Steps to reproduce:
- Create a new project from existing code
- Create Python 3.6 env
- Open a REPL window
- Type
$attach
Maybe I’m doing something wrong?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have to say that even after reading the docs multiple times, there’s something I’m missing.
I want to debug a function called from an interactive window. So if I have a function
a
I want to put a breakpoint on the first line of the definition ofa
and typea()
in the debug window and then step line-by-line. I thought this use case might be available through$attach
.I also tried putting one breakpoint on the first line in
a
’s function body, and another breakpoint right after the defenition ofa
. I then run the file using the regular debugger (F5), skip the first breakpoint and pause on the second one. Now via the ‘Debug’ REPL window, I typea()
. The function executes but my first breakpoint is not hit.So how should I be doing it?
OK managed to get this working. I have to say that it the path to get to this point is completely non-trivial and shoud probably be documented somewhere.
As far as I’m concerned my original problem is solved, however the docs really aren’t updated about this in any way so I suggest regarding this issue as applied to the docs only. You can close at your discretion. Thanks for the help!