-
Notifications
You must be signed in to change notification settings - Fork 67
Generated code often leads to source unavailable #1398
Comments
When I used requests.get(), the program ended unexpectedly. I tried to debug at this location and then showed ‘Could not load source '<string>': Source unavailable. ’, the call stack was '__new__' |
@Zrincet, when you get that message, your program is paused normally, it just means that it's inside code for which there's no source. Usually this means that something is doing You can press F5 to continue running as usual, or even step in/over/out (although you won't see where you're stepping through, until you reach code with source again). |
@int19h , If I breakpoints at requests.get(), the program will not continue to run while debugging. The program was closed unexpectedly without any prompts. I thought the problem was with my code, but in the end I found out that it was because of a breakpoint at requests.get(). If the statement following the requests.get() breakpoints, debugging will not go wrong. |
@Zrincet, got it! Can you please do this in your launch config: "env": {
...
"PTVSD_LOG_DIR": "<directory-to store-logs>",
}, and share the logs that it places there? You'll have to create the directory first, and there may be more than one log if you're running Flask with reloading enabled (it creates one log per process). If there's any private information in your environment, check the logs first. There's stuff there like pathnames etc that might expose your username, for example. And it also logs all protocol messages, so any private data in the app you're running could also be exposed via Variable Explorer. None of that is relevant for us to diagnose this particular problem. Also, since not continuing to run properly is a distinct problem from the one this issue covers, can you please open as separate issue, and put the logs there? |
Minimal repro, step into, with "justMyCode: true"
The text was updated successfully, but these errors were encountered: