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

Debug Auto Attach Support #1193

Open
Malix-Labs opened this issue Oct 24, 2024 · 0 comments
Open

Debug Auto Attach Support #1193

Malix-Labs opened this issue Oct 24, 2024 · 0 comments

Comments

@Malix-Labs
Copy link

Malix-Labs commented Oct 24, 2024

image

Workaround

I did succeed to make a custom launch.json to launch a chrome dev window and attach the vscode debugger to it

launch.json

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Launch Chrome",
			"request": "launch",
			"type": "chrome",
			"url": "http://localhost:5173",
			"webRoot": "${workspaceFolder}/src",
			"preLaunchTask": "deno: dev (parallel)"
		}
	]
}

But at this point, there stil is a problem in that preLaunchTask does wait for the task to finish, but the usual deno: dev / deno run dev task which binds to vite dev is long-lived (meaning it should stay alive during the debugging session).
See my feature request to make it allowed to be a background task instead : microsoft/vscode#232200

A workaround for this second issue is to make a custom user task of the deno provided deno: dev task :

tasks.json

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "deno",
			"command": "task",
			"args": [
				"dev"
			],
			"problemMatcher": [
				"$deno"
			],
			"label": "deno: dev (parallel)",
			"detail": "$ vite dev",
			"isBackground": true
		}
	]
}	

Now, it should work reliably, but it is far from working out of the box nor auto attaching automatically

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

1 participant