-
Notifications
You must be signed in to change notification settings - Fork 67
Debugger not working properly. #1006
Comments
Please try the following:
"logToFile": true,
|
From @JasonWorks on October 11, 2018 18:17 |
From @JasonWorks on October 15, 2018 16:55 Thoughts? |
From @mikinushu on October 15, 2018 19:26 Hi, debug.log content: {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"python","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"},"type":"request","seq":1} {"seq":1,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsExceptionInfoRequest":true,"supportsConfigurationDoneRequest":true,"supportsConditionalBreakpoints":true,"supportsSetVariable":true,"supportsExceptionOptions":true,"supportsEvaluateForHovers":true,"supportsModulesRequest":true,"supportsValueFormattingOptions":true,"supportsHitConditionalBreakpoints":true,"supportsSetExpression":true,"supportsLogPoints":true,"supportTerminateDebuggee":true,"supportsCompletionsRequest":true,"exceptionBreakpointFilters":[{"filter":"raised","label":"Raised Exceptions","default":false},{"filter":"uncaught","label":"Uncaught Exceptions","default":true}]}} {"command":"launch","arguments":{"name":"Python: Current File (Integrated Terminal)","type":"python","request":"launch","program":"c:\Users\Michael\Anaconda3\envs\mod-prj\Dev\trials.py","console":"integratedTerminal","logToFile":true,"pythonPath":"C:\Users\Michael\Anaconda3\envs\mod-prj\python.exe","cwd":"c:\Users\Michael\Anaconda3\envs\mod-prj","envFile":"c:\Users\Michael\Anaconda3\envs\mod-prj\.env","stopOnEntry":false,"internalConsoleOptions":"neverOpen","debugOptions":["RedirectOutput","FixFilePathCase"],"__sessionId":"8d4192bf-7bd8-4215-96ca-70da1c204144"},"type":"request","seq":2} {"command":"runInTerminal","arguments":{"kind":"integrated","title":"Python Debug Console","cwd":"c:\Users\Michael\Anaconda3\envs\mod-prj","args":["C:\Users\Michael\Anaconda3\envs\mod-prj\python.exe","c:\Users\Michael\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd_launcher.py","53246","c:\Users\Michael\Anaconda3\envs\mod-prj\Dev\trials.py"],"env":{"PYTHONIOENCODING":"UTF-8","PYTHONUNBUFFERED":"1"}},"type":"request","seq":2} {"type":"response","seq":3,"command":"runInTerminal","request_seq":2,"success":true,"body":{}} To Client: To Client: {"type": "event", "seq": 0, "event": "output", "body": {"category": "telemetry", "output": "ptvsd", "data": {"version": "4.1.3"}}}Content-Length: 113 {"type": "response", "seq": 1, "request_seq": 2, "success": true, "command": "launch", "message": "", "body": {}} {"type": "response", "seq": 2, "request_seq": 1, "success": true, "command": "initialize", "message": "", "body": {"supportsCompletionsRequest": true, "supportsConditionalBreakpoints": true, "supportsConfigurationDoneRequest": true, "supportsDebuggerProperties": true, "supportsEvaluateForHovers": true, "supportsExceptionInfoRequest": true, "supportsExceptionOptions": true, "supportsHitConditionalBreakpoints": true, "supportsLogPoints": true, "supportsModulesRequest": true, "supportsSetExpression": true, "supportsSetVariable": true, "supportsValueFormattingOptions": true, "supportTerminateDebuggee": true, "exceptionBreakpointFilters": [{"filter": "raised", "label": "Raised Exceptions", "default": false}, {"filter": "uncaught", "label": "Uncaught Exceptions", "default": true}]}}Content-Length: 63 {"type": "event", "seq": 3, "event": "initialized", "body": {}} {"command":"setBreakpoints","arguments":{"source":{"name":"trials.py","path":"C:\Users\Michael\Anaconda3\envs\mod-prj\Dev\trials.py"},"lines":[7],"breakpoints":[{"line":7}],"sourceModified":false},"type":"request","seq":4} To Client: {"command":"setExceptionBreakpoints","arguments":{"filters":["uncaught"]},"type":"request","seq":5} To Client: {"command":"configurationDone","type":"request","seq":6} {"type": "response", "seq": 6, "request_seq": 6, "success": true, "command": "configurationDone", "message": "", "body": {}} {"command":"threads","type":"request","seq":7} {"type": "event", "seq": 7, "event": "thread", "body": {"reason": "started", "threadId": 1}} {"type": "response", "seq": 8, "request_seq": 7, "success": true, "command": "threads", "message": "", "body": {"threads": [{"id": 1, "name": "MainThread"}]}} To Client: {"type": "event", "seq": 10, "event": "stopped", "body": {"reason": "breakpoint", "threadId": 1, "text": null, "description": null, "preserveFocusHint": false}} {"command":"threads","type":"request","seq":8} {"type": "response", "seq": 11, "request_seq": 8, "success": true, "command": "threads", "message": "", "body": {"threads": [{"id": 1, "name": "MainThread"}]}} {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request","seq":9} {"type": "event", "seq": 12, "event": "module", "body": {"reason": "new", "module": {"id": 1, "package": null, "path": "C:\Users\Michael\Anaconda3\envs\mod-prj\Dev\trials.py", "name": "main"}}} {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request","seq":10} {"type": "response", "seq": 13, "request_seq": 9, "success": true, "command": "stackTrace", "message": "", "body": {"stackFrames": [], "totalFrames": 0}} To Client: {"command":"threads","type":"request","seq":11} {"type": "response", "seq": 15, "request_seq": 11, "success": true, "command": "threads", "message": "", "body": {"threads": [{"id": 1, "name": "MainThread"}]}} {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request","seq":12} {"type": "response", "seq": 16, "request_seq": 12, "success": true, "command": "stackTrace", "message": "", "body": {"stackFrames": [], "totalFrames": 0}} {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":13} onEventTerminated |
From @berkobob on October 16, 2018 10:25 Same bug here: |
From @heniu66 on October 24, 2018 10:30 I have the same problem. Consistently when the Anaconda env is used (and it is not the base environment). Tested on Windows 10 Pro and two Ubuntu 18.4 (bionic beaver) machines.
|
From @d3r3kk on October 26, 2018 2:25 Hmmm. Seems like we are getting 0-length stackframes back from these scenarios. I'm probably going to need some help on this issue @DonJayamanne. From the user's that have reported the issue along with the {
"type": "response",
"seq": 13,
"request_seq": 9,
"success": true,
"command": "stackTrace",
"message": "",
"body": {
"stackFrames": [], // <== This is not what I see locally!
"totalFrames": 0
}
} Here's what the request/response interaction looks like for me, vs. what it looks like for the others:
Attached: debug.log parsed data from myself and the user reports in a working vscode workspace. Note that I used Win10, latest vscode-insiders, latest revision of the extension, ptvsd 4.1.3, and Python 2.7.14 using |
@JasonWorks Note, in your |
From @JasonWorks on October 30, 2018 23:41 I'm not following. What do you mean by Environment directory? The code I'm working with is in /usr/local/google/home/jasonworks/src/test/Hello.py. That directory/file isn't in my environment's path or anywhere related to vscode as far as I know. Please elaborate. |
From @JasonWorks on October 30, 2018 23:50 I think you are seeing the image cut off from resizing and the terminal maintains the original column spacing. Here is the full terminal command... |
From @JasonWorks on October 30, 2018 23:51 Please reopen. |
From @JasonWorks on October 31, 2018 0:16 @DonJayamanne |
@heniu66 @mikinushu Note, in your |
From @berkobob on October 31, 2018 16:54 I get the same problem with Linux Mint 19 Cinnamon 64-bit I've just noticed that I only seem to have this problem when using a virtual environment. When there's no venv it works fine. |
From @mattpepin on November 9, 2018 17:0 I have exactly the same issue as @berkobob but in Windows 10, using either VSCode/VSCode Insiders. I found that If there's a pyvenv.cfg file, the breakpoints don't work correctly. If I remove it, it raises an Exception on an unknown import, but it pauses correctly on the good line of the import. |
From @berkobob on November 9, 2018 18:42 I believe that the pyvenv.cfg file is created by venv so I created an environment with virtualenv instead (i.e. no pyvenv.cfg created) and I had the same problem. It would be great to get this problem fixed. |
From @JasonWorks on November 9, 2018 23:44 I'm not sure if it was occurring earlier, but I'm now noticing that when "Paused on Bbreakpoint" (4a in original post) the orange status bar is indicating... Installing packages... and if I move my mouse over the message it says... Installing package 'Razor Language Server (Linux / x64)' - not sure what that is all about. I'm still attempting to continue to use vscode without a python debugger, but may have to go elsewhere if progress cannot be made. @DonJayamanne, please provide an update if you can. |
From @SellWeek on November 10, 2018 16:4 Same problem for me, Arch Linux, 64-bit, VS Code 1.28.2, ms-python.python 2018.10.1. |
From @verkurkie on November 12, 2018 16:0 Similar issue here on both VScode and VS Code Insider. I see this issue when running my app with the "Python : Django" profile but the "hello.py" exercise works! :-\ With breakpoints turned on, the debugger starts but just sits there! No stack, nothing ... Platform: Windows 10 x64 my Django profile in launch.json (obfuscated for privacy):
My debug log (obfuscated for privacy): Hope this can be resolved soon! |
The debugger includes |
From @JasonWorks on October 11, 2018 17:46
Environment data
Actual behavior
Breakpoint pauses execution, but provides no debugger functionality
Expected behavior
I'm expecting the debugger to stop at the breakpoint and present me with the various variables and call stack.
Steps to reproduce:
msg = "Hello"
print(msg)
4a. For vscode 1.27.0, the debugger toolbar comes up with Continue, Step Over, Step Into, Step Out, Restart, and Stop all enabled - breakpoint appears to be hit and Call Stack says "Paused on breakpoint", but no variables or call stack information presented. If I click on Continue, Step Over, Step Into, Step Out then 'Hello' is printed and the program finishes it's run (this is true even if I place the break point on the msg definition line).
4b. For vscode 1.28.0, the debugger toolbar comes up with Pause, Restart, and Stop enabled - breakpoint appears to be hit but none of the other buttons are enabled. Call Stack says "Paused on breakpoint", but no variables or call stack information presented. Unable to do anything meaningful at this point other than Stop - Pause does nothing.
4c. If the breakpoint was not set then 'Hello' is printed out in the terminal, the process finishes, and the prompt shows.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)##########Linting Output - pylint##########
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)INFO no standard startup: not a new window
Copied from original issue: microsoft/vscode-python#2865
The text was updated successfully, but these errors were encountered: