Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python debugger not running when the start button is clicked on #1291

Closed
SuryavaBhattacharya opened this issue Apr 4, 2018 · 15 comments
Closed
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@SuryavaBhattacharya
Copy link

SuryavaBhattacharya commented Apr 4, 2018

Environment data

  • VS Code version: 1.21.1
  • Extension version (available under the Extensions sidebar): 2018.3.1
  • OS and version: Windows 10, version 1709
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda 5.1.0 Python 3.6.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: XXX

Actual behavior

I start the Debug, but it keeps loading and does not actually start the debug process:
image
The blue bar keeps moving left to right but the debug process doesn't start.
I have checked whether it's an issue with the Debugger by Debugging a .c file, but that works just fine, so it must be a problem with Python.
In the integrated terminal, within cd command, this comes up:

" ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\surya\Anaconda3\python.exe'".... "'51334' '34806ad9-833a-4524-8cd6-18ca4aa74f14' 'RedirectOutput,RedirectOutput'"

Expected behavior

The Debug starts and then runs

Steps to reproduce:

  1. Unsure; it was working before, but isn't anymore...

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

##########Linting Output - pylint##########
No config file found, using default configuration

--------------------------------------------------------------------

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

[C:\Users\surya\.vscode\extensions\ms-vscode.cpptools-0.16.1]: Command `workbench.action.gotoSymbol` appears multiple times in the `commands` section.
extensionService.ts:786 [C:\Users\surya\.vscode\extensions\ms-vscode.cpptools-0.16.1]: Command `workbench.action.showAllSymbols` appears multiple times in the `commands` section.
TMSyntax.ts:43 Overwriting grammar scope name to file mapping for scope source.python.
Old grammar file: c:\Program Files\Microsoft VS Code\resources\app\extensions\python\syntaxes\MagicPython.tmLanguage.json.
New grammar file: C:\Users\surya\.vscode\extensions\magicstack.magicpython-1.0.12\grammars\MagicPython.tmLanguage
e.register @ TMSyntax.ts:43
TMSyntax.ts:43 Overwriting grammar scope name to file mapping for scope text.bibtex.
Old grammar file: C:\Users\surya\.vscode\extensions\James-Yu.latex-workshop-5.0.3\syntax\Bibtex.plist.
New grammar file: C:\Users\surya\.vscode\extensions\torn4dom4n.latex-support-1.5.1\grammars\BibTeX.json
e.register @ TMSyntax.ts:43
TMSyntax.ts:43 Overwriting grammar scope name to file mapping for scope text.tex.latex.
Old grammar file: C:\Users\surya\.vscode\extensions\James-Yu.latex-workshop-5.0.3\syntax\LaTeX.plist.
New grammar file: C:\Users\surya\.vscode\extensions\torn4dom4n.latex-support-1.5.1\grammars\LaTeX.json
e.register @ TMSyntax.ts:43
TMSyntax.ts:43 Overwriting grammar scope name to file mapping for scope text.tex.
Old grammar file: C:\Users\surya\.vscode\extensions\James-Yu.latex-workshop-5.0.3\syntax\TeX.plist.
New grammar file: C:\Users\surya\.vscode\extensions\torn4dom4n.latex-support-1.5.1\grammars\TeX.json
e.register @ TMSyntax.ts:43
console.ts:136 [Extension Host] Congratulations, your extension "terminal" is now active!
console.ts:136 [Extension Host] activating extension
console.ts:136 [Extension Host] Starting express server on port: 51692
console.ts:136 [Extension Host] using C:/Users/surya/.vscode/extensions/vsciot-vscode.vscode-arduino-0.2.11/vendor/node-usb-native/lib/native/usb-native_win32_1.7.3_x64.node
console.ts:136 [Extension Host] Python Extension: Failed to get conda environment list from conda Error: spawn conda ENOENT
	at exports._errnoException (util.js:1050:11)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
	at onErrorNT (internal/child_process.js:367:16)
	at _combinedTickCallback (internal/process/next_tick.js:80:11)
	at process._tickCallback (internal/process/next_tick.js:104:9)
t.log @ console.ts:136

@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug needs verification area-debugging labels Apr 4, 2018
@brettcannon
Copy link
Member

@SuryavaBhattacharya can you do a few things for us?

  1. Try the latest release of the extension
  2. If it's still failing then try the experimental debugger? (I.e. change the type from python to "type": "pythonExperimental")
  3. If that still fails then provide your launch.json and settings.json?

@brettcannon brettcannon added info-needed Issue requires more information from poster and removed needs verification labels May 3, 2018
@DonJayamanne
Copy link

Also, please disable all extensions except for the Python extension when trying this out.

@SuryavaBhattacharya
Copy link
Author

SuryavaBhattacharya commented May 14, 2018

@brettcannon
The debugger still doesn't initiate, with normal launch settings.
Using experimental modes gives mixed results:
It either gives a timeout error "Timeout waiting for debugger connection" or it runs with the following error:

Set-Location : A positional parameter cannot be found that accepts argument 's'.
At line:1 char:1
+ cd 'c:\Users\surya\OneDrive - King's College London\MoreDHCPdata'; ${ ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

warning: Debugger speedups using cython not found. Run '"C:\Users\surya\Anaconda3\python.exe" "C:\Users\surya\.vscode\extensions\ms-python.python-2018.4.0\pythonFiles\eonFi
warning: Debugger speedups using cython not found. Run '"C:\Users\surya\Anaconda3\python.exe" "C:\Users\surya\.vscode\extensions\ms-python.python-2018.4.0\pyth
on
warning: Debugger speedups using cython not found. Run '"C:\Users\surya\Anaconda3\python.exe" "C:\Users\surya\.vscode\extensions\ms-python.python-2018.4.0\pyth deprecat4.0\pyt
At line:1 char:1
+ cd 'c:\Users\surya\OneDrive - King's College London\MoreDHCPdata'; ${ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

warning: Debugger speedups using cython not found. Run '"C:\Users\surya\Anaconda3\python.exe" "C:\Users\surya\.vscode\extensions\ms-python.python-2018.4.0\pythonFiles\experimental\ptvsd\ptvsd\pydevd\setup8.4.0\pythonFiles\experimental\ptvsd\ptvsd\pydevd\setup_cython.py" build_ext --inplace' to build.
pydev debugger: starting

It alternates between these two errors. So, if I debug it once, it'll give the timeout error. Then clicking debug again runs the debugger and I can debug, but the error above is given. You could say it works but you have try it multiple times and it still gives the error above....

My settings code for python are as follows:

// Automatically add brackets for functions.
  "python.autoComplete.addBrackets": false,

  // List of paths to libraries and the like that need to be imported by auto complete engine. E.g. when using Google App SDK, the paths are not in system path, hence need to be added into this list.
  "python.autoComplete.extraPaths": [],

  // Comma delimited list of modules preloaded to speed up Auto Complete (e.g. add Numpy, Pandas, etc, items slow to load when autocompleting).
  "python.autoComplete.preloadModules": [],

  // Controls appearance of methods with double underscores in the completion list.
  "python.autoComplete.showAdvancedMembers": false,

  // Whether to check if Python is installed (also warn when using the macOS-installed Python).
  "python.disableInstallationCheck": false,

  // Do not display a prompt to install these features
  "python.disablePromptForFeatures": [],

  // Absolute path to a file containing environment variable definitions.
  "python.envFile": "${workspaceFolder}/.env",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.formatting.autopep8Args": [],

  // Path to autopep8, you can use a custom version of autopep8 by modifying this setting to include the full path.
  "python.formatting.autopep8Path": "autopep8",

  // Provider for formatting. Possible options include 'autopep8' and 'yapf'.
  "python.formatting.provider": "autopep8",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.formatting.yapfArgs": [],

  // Path to yapf, you can use a custom version of yapf by modifying this setting to include the full path.
  "python.formatting.yapfPath": "yapf",

  // Whether to install Python modules globally when not using an environment.
  "python.globalModuleInstallation": false,

  // Memory limit for the Jedi completion engine in megabytes. Zero (default) means 1024 MB. -1 means unlimited (disable memory limit check)
  "python.jediMemoryLimit": 0,

  // Path to directory containing the Jedi library (this path will contain the 'Jedi' sub directory).
  "python.jediPath": "",

  // Whether to lint Python files.
  "python.linting.enabled": true,

  // Arguments passed in. Each argument is a separate item in the array.
  "python.linting.flake8Args": [],

  // Severity of Flake8 message type 'E'.
  "python.linting.flake8CategorySeverity.E": "Error",

  // Severity of Flake8 message type 'F'.
  "python.linting.flake8CategorySeverity.F": "Error",

  // Severity of Flake8 message type 'W'.
  "python.linting.flake8CategorySeverity.W": "Warning",

  // Whether to lint Python files using flake8
  "python.linting.flake8Enabled": false,

  // Path to flake8, you can use a custom version of flake8 by modifying this setting to include the full path.
  "python.linting.flake8Path": "flake8",

  // Patterns used to exclude files or folders from being linted.
  "python.linting.ignorePatterns": [
    ".vscode/*.py",
    "**/site-packages/**/*.py"
  ],

  // Whether to lint Python files when saved.
  "python.linting.lintOnSave": true,

  // Controls the maximum number of problems produced by the server.
  "python.linting.maxNumberOfProblems": 100,

  // Arguments passed in. Each argument is a separate item in the array.
  "python.linting.mypyArgs": [
    "--ignore-missing-imports",
    "--follow-imports=silent"
  ],

  // Severity of Mypy message type 'Error'.
  "python.linting.mypyCategorySeverity.error": "Error",

  // Severity of Mypy message type 'Note'.
  "python.linting.mypyCategorySeverity.note": "Information",

  // Whether to lint Python files using mypy.
  "python.linting.mypyEnabled": false,

  // Path to mypy, you can use a custom version of mypy by modifying this setting to include the full path.
  "python.linting.mypyPath": "mypy",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.linting.pep8Args": [],

  // Severity of Pep8 message type 'E'.
  "python.linting.pep8CategorySeverity.E": "Error",

  // Severity of Pep8 message type 'W'.
  "python.linting.pep8CategorySeverity.W": "Warning",

  // Whether to lint Python files using pep8
  "python.linting.pep8Enabled": false,

  // Path to pep8, you can use a custom version of pep8 by modifying this setting to include the full path.
  "python.linting.pep8Path": "pep8",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.linting.prospectorArgs": [],

  // Whether to lint Python files using prospector.
  "python.linting.prospectorEnabled": false,

  // Path to Prospector, you can use a custom version of prospector by modifying this setting to include the full path.
  "python.linting.prospectorPath": "prospector",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.linting.pydocstyleArgs": [],

  // Whether to lint Python files using pydocstyle
  "python.linting.pydocstyleEnabled": false,

  // Path to pydocstyle, you can use a custom version of pydocstyle by modifying this setting to include the full path.
  "python.linting.pydocstylePath": "pydocstyle",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.linting.pylamaArgs": [],

  // Whether to lint Python files using pylama.
  "python.linting.pylamaEnabled": false,

  // Path to pylama, you can use a custom version of pylama by modifying this setting to include the full path.
  "python.linting.pylamaPath": "pylama",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.linting.pylintArgs": [],

  // Severity of Pylint message type 'Convention/C'.
  "python.linting.pylintCategorySeverity.convention": "Information",

  // Severity of Pylint message type 'Error/E'.
  "python.linting.pylintCategorySeverity.error": "Error",

  // Severity of Pylint message type 'Fatal/F'.
  "python.linting.pylintCategorySeverity.fatal": "Error",

  // Severity of Pylint message type 'Refactor/R'.
  "python.linting.pylintCategorySeverity.refactor": "Hint",

  // Severity of Pylint message type 'Warning/W'.
  "python.linting.pylintCategorySeverity.warning": "Warning",

  // Whether to lint Python files using pylint.
  "python.linting.pylintEnabled": true,

  // Path to Pylint, you can use a custom version of pylint by modifying this setting to include the full path.
  "python.linting.pylintPath": "pylint",

  // Whether to run Pylint with minimal set of rules.
  "python.linting.pylintUseMinimalCheckers": true,

  // Path to Python, you can use a custom version of Python by modifying this setting to include the full path.
  "python.pythonPath": "python",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.sortImports.args": [],

  // Path to isort script, default using inner version
  "python.sortImports.path": "",

  // Activate Python Environment in Terminal created using the Extension.
  "python.terminal.activateEnvironment": true,

  // When executing a file in the terminal, whether to use execute in the file's directory, instead of the current open folder.
  "python.terminal.executeInFileDir": false,

  // Python launch arguments to use when executing a file in the terminal.
  "python.terminal.launchArgs": [],

  // Optional working directory for unit tests.
  "python.unitTest.cwd": null,

  // IP Address of the of the local unit test server (default is localhost or use 127.0.0.1).
  "python.unitTest.debugHost": "localhost",

  // Port number used for debugging of unittests.
  "python.unitTest.debugPort": 3000,

  // Arguments passed in. Each argument is a separate item in the array.
  "python.unitTest.nosetestArgs": [],

  // Path to nosetests, you can use a custom version of nosetests by modifying this setting to include the full path.
  "python.unitTest.nosetestPath": "nosetests",

  // Whether to enable or disable unit testing using nosetests.
  "python.unitTest.nosetestsEnabled": false,

  // Where to prompt to configure a test framework if potential tests directories are discovered.
  "python.unitTest.promptToConfigure": true,

  // Arguments passed in. Each argument is a separate item in the array.
  "python.unitTest.pyTestArgs": [],

  // Whether to enable or disable unit testing using pytest.
  "python.unitTest.pyTestEnabled": false,

  // Path to pytest (pytest), you can use a custom version of pytest by modifying this setting to include the full path.
  "python.unitTest.pyTestPath": "pytest",

  // Arguments passed in. Each argument is a separate item in the array.
  "python.unitTest.unittestArgs": [
    "-v",
    "-s",
    ".",
    "-p",
    "*test*.py"
  ],

  // Whether to enable or disable unit testing using unittest.
  "python.unitTest.unittestEnabled": false,

  // Use the experimental debugger when debugging unit tests.
  "python.unitTest.useExperimentalDebugger": false,

  // Folders in your home directory to look into for virtual environments.
  "python.venvFolders": [
    "envs",
    ".pyenv",
    ".direnv"
  ],

  // Path to folder with a list of Virtual Environments (e.g. ~/.pyenv, ~/Envs, ~/.virtualenvs).
  "python.venvPath": "",

  // Fully qualilified path to the ctags executable (else leave as ctags, assuming it is in current path).
  "python.workspaceSymbols.ctagsPath": "ctags",

  // Set to 'false' to disable Workspace Symbol provider using ctags.
  "python.workspaceSymbols.enabled": true,

  // Pattern used to exclude files and folders from ctags See http://ctags.sourceforge.net/ctags.html.
  "python.workspaceSymbols.exclusionPatterns": [
    "**/site-packages/**"
  ],

  // Whether to re-build the tags file on when changes made to python files are saved.
  "python.workspaceSymbols.rebuildOnFileSave": true,

  // Whether to re-build the tags file on start (defaults to true).
  "python.workspaceSymbols.rebuildOnStart": true,

  // Fully qualified path to tag file (exuberant ctag file), used to provide workspace symbols.
  "python.workspaceSymbols.tagFilePath": "${workspaceFolder}/.vscode/tags"

}
,
{


  // Default settings per language.
  "jupyter.languages": [
    {
      "languageId": "python",
      "startupCode": [
        "%matplotlib inline"
      ],
      "cellIdentificationPattern": "^(#\\s*%%|#\\s*\\<codecell\\>|#\\s*In\\[\\d*?\\]|#\\s*In\\[ \\])(.*)"
    },
    {
      "languageId": "javascript",
      "cellIdentificationPattern": "^(\\/\\/ %%|\\/\\/%%|\\/\\/ \\<codecell\\>|\\/\\/ In\\[\\d*?\\]|\\/\\/ In\\[ \\])(.*)"
    }
  ],

  // Whether to append the results to results window, else clear and display.
  "jupyter.appendResults": true,

  // 'jupyter notebook' command line arguments. Each argument is a separate item in the array. For a full list type 'jupyter notebook --help' in a terminal window.
  "jupyter.notebook.startupArgs": [
    "--no-browser",
    "--port=8888",
    "--NotebookApp.allow_origin=\"*\""
  ]

My launch.json is:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Watson",
            "type": "pythonExperimental",
            "request": "launch",
            "program": "${workspaceFolder}/console.py",
            "args": [
                "dev",
                "runserver",
                "--noreload=True"
            ],
            "jinja": true
        },
        {
            "name": "Python Experimental: Terminal (integrated)",
            "type": "pythonExperimental",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        },
        {
            "name": "Python Experimental: Terminal (external)",
            "type": "pythonExperimental",
            "request": "launch",
            "program": "${file}",
            "console": "externalTerminal"
        },
        {
            "name": "Scrapy",
            "type": "pythonExperimental",
            "request": "launch",
            "module": "scrapy",
            "args": [
                "crawl",
                "specs",
                "-o",
                "bikes.json"
            ]
        },
        {
            "name": "PySpark",
            "type": "pythonExperimental",
            "request": "launch",
            "osx": {
                "pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
            },
            "windows": {
                "pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd"
            },
            "linux": {
                "pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
            },
            "program": "${file}"
        },
        {
            "name": "Pyramid",
            "type": "pythonExperimental",
            "request": "launch",
            "args": [
                "${workspaceFolder}/development.ini"
            ],
            "pyramid": true,
            "jinja": true
        },
        {
            "name": "Flask",
            "type": "pythonExperimental",
            "request": "launch",
            "module": "flask",
            "env": {
                "FLASK_APP": "${workspaceFolder}/app.py"
            },
            "args": [
                "run",
                "--no-debugger",
                "--no-reload"
            ],
            "jinja": true
        },
        {
            "name": "Django",
            "type": "pythonExperimental",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "--noreload",
                "--nothreading"
            ],
            "django": true
        },
        {
            "name": "Attach (Remote Debug)",
            "type": "pythonExperimental",
            "request": "attach",
            "port": 3000,
            "host": "localhost"
        },
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}"
        },
        {
            "name": "Python: Attach",
            "type": "python",
            "request": "attach",
            "localRoot": "${workspaceFolder}",
            "remoteRoot": "${workspaceFolder}",
            "port": 3000,
            "secret": "my_secret",
            "host": "localhost"
        },
        {
            "name": "Python: Terminal (integrated)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        },
        {
            "name": "Python: Terminal (external)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "externalTerminal"
        },
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "--noreload",
                "--nothreading"
            ],
            "debugOptions": [
                "RedirectOutput",
                "Django"
            ]
        },
        {
            "name": "Python: Flask (0.11.x or later)",
            "type": "python",
            "request": "launch",
            "module": "flask",
            "env": {
                "FLASK_APP": "${workspaceFolder}/app.py"
            },
            "args": [
                "run",
                "--no-debugger",
                "--no-reload"
            ]
        },
        {
            "name": "Python: Module",
            "type": "python",
            "request": "launch",
            "module": "module.name"
        },
        {
            "name": "Python: Pyramid",
            "type": "python",
            "request": "launch",
            "args": [
                "${workspaceFolder}/development.ini"
            ],
            "debugOptions": [
                "RedirectOutput",
                "Pyramid"
            ]
        },
        {
            "name": "Python: Watson",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/console.py",
            "args": [
                "dev",
                "runserver",
                "--noreload=True"
            ]
        },
        {
            "name": "Python: All debug Options",
            "type": "python",
            "request": "launch",
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "module": "module.name",
            "env": {
                "VAR1": "1",
                "VAR2": "2"
            },
            "envFile": "${workspaceFolder}/.env",
            "args": [
                "arg1",
                "arg2"
            ],
            "debugOptions": [
                "RedirectOutput"
            ]
        }
    ]
}

Thanks

@SuryavaBhattacharya
Copy link
Author

@DonJayamanne Disabling all the other extensions, except the Python extension, had no additional effect.

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels May 14, 2018
@chen2013
Copy link

met the same problem when debugging time-consuming functions with django

@DonJayamanne
Copy link

Please could you provide some sample code that we could use to replicate this issue.

@brettcannon brettcannon added info-needed Issue requires more information from poster and removed needs verification labels May 22, 2018
@mike-pt
Copy link

mike-pt commented Jun 8, 2018

I'm running into the same after a few successful tries, in some case it also was working again after reboot... but now I can't even make it work after reboot...

I wonder if this is somewhat related to https://stackoverflow.com/questions/13597812/pydev-cant-debug-anymore?

@mike-pt
Copy link

mike-pt commented Jun 8, 2018

Hum.. I deleted *.sock *Cache* and *cookies* dirs under ~/Library/Application Support/Code closed/reopen vsCode and now pydev starts the process with the same config...

So perhaps we are not cleaning something? I'm unsure what to be honest but perhaps this offers some hint @DonJayamanne ?

EDIT: I also deleted the Local Storage dir as a last resort, almost forgot to mention, I just hit the issue again, and doing that does fix the issue.

@DonJayamanne
Copy link

@mike-pt
Please confirm you are able to replicate this by debugging a simple python script containing either a print or a loop.

@mike-pt
Copy link

mike-pt commented Jun 9, 2018

No I can't and I doubt that's possible.

I believe this is only triggered when debugging complex scripts (with imports to other files and args etc)

With a simple print this seems to work fine.

I feels like if we have to stop / restart the debugger for some reason we hit this issue.

I investigated further and wipped just the keys that were related to debug and python in LocalStorage restarted and this makes it work again...

I also tested by turning of the automatic breakpoints (on exceptions) let it run until the end.... Then again... And again and I couldn't repro...

Using stopped doesn't always cause it though which is intriguing... Might also have to do with where I'm stopping ...
In any case I suppose if clearing LocalStorage fixes it, maybe it means vscode is not cleaning thing properly after a debug session is unexpectedly terminated... Which como think of it might be a vscode issue and not the extension?

But yeah it seems only complex scripts trigger it...

@SuryavaBhattacharya
Copy link
Author

For me, this problem occurs regardless of the complexity of the script. It still as I described in my precious post. The debugger doesn't run or is volatile when running. It does unexpected things and doesn't stop at breakpoints if it does run

@no-response no-response bot removed the info-needed Issue requires more information from poster label Jun 12, 2018
@DonJayamanne
Copy link

@SuryavaBhattacharya Please could you change your terminal from powershell to command prompt.
See here https://code.visualstudio.com/docs/editor/integrated-terminal#_common-questions

Once changed, please restart VS Code and test once again.

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Jun 12, 2018
@SuryavaBhattacharya
Copy link
Author

@DonJayamanne I tried this to no avail....

@no-response no-response bot removed the info-needed Issue requires more information from poster label Jun 13, 2018
@DonJayamanne
Copy link

@SuryavaBhattacharya

  • Please could you send a screen shot of the Terminal window when this doesn't work
  • Please send screenshots of errors displayed
  • Please go into the menu Help->Toggle Developer Tools and look for errors in the `console window

@SuryavaBhattacharya
Copy link
Author

@DonJayamanne It seems that after I restarted my computer, your solution worked!
Thank you so much!!
In terms of error messages, my previous comments contains the error messages I have been getting and the terminal window messages, in case you want to keep these for future reference.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants