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

VSCode python debugger not changing working directories #561

Open
nygrenh opened this issue Nov 13, 2020 · 0 comments
Open

VSCode python debugger not changing working directories #561

nygrenh opened this issue Nov 13, 2020 · 0 comments
Assignees
Milestone

Comments

@nygrenh
Copy link
Member

nygrenh commented Nov 13, 2020

Depends on microsoft/vscode#111037

Problem occured when debugging exercises that reads files (for example first exercise in part 6).
https://ohjelmointi-21.mooc.fi/osa-6/1-tiedostojen-lukeminen#tiedostoja-lukevan-koodin-debuggaus

Problem can be solved by adding this to .code-workspace:

    "launch": {
		"configurations": [
			{
				"name": "TestMyCode: Debug open file",
            	"type": "python",
            	"request": "launch",
				"cwd": "${fileDirname}",
				"program": "${file}"
			}
		],
		"compounds": []
	}

This also enables F5 debugging without drop-down choosing as mentioned here https://ohjelmointi-21.mooc.fi/osa-4/1-vscode#debuggeri

  • "type" needs to be figured out by extension if this is written by the extension to the course code-workspace file.
    • Can we assume, that the same "type" is for the whole course?

Alternative: Or should we generate launch.json files automatically for each exercise, does this work?

@jolampi jolampi self-assigned this Nov 20, 2020
@jolampi jolampi added the pending Requires external changes label Dec 15, 2020
@sebazai sebazai removed the pending Requires external changes label Nov 1, 2021
@sebazai sebazai added this to the Release 2.2.0 milestone Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants