prevent VS code notification: 'launch' is already running. Do you want to start another instance?

Viewed 533

I'm writing an ui with tkinter (ttk), and if I run the my program while an other instance of the ui is open, VS code (starting today) started giving a (error) notification which looks like this:

error notification

I'm not sure but I think this started happening when I started using ttk (instead of only tkinter). I know you're not meant to run multiple instances of your program, but while coding it's very convenient to be able to see what you're changing along the way, and not have to close your previous instance.

Is there a way to stop this notification of appearing?

2 Answers

I bound F5 to restart, so i only have to run it once, and to see changes i restart that instance (changed run to F7)

Is there a way to stop this notification of appearing?

VSCode 1.71 (August 2022) should offer an option for that.

See issue 147912 and PR 147914

Add new launch config debug option for silent '{0}' is already running. Do you want to start another instance? confirm dialog.

Tested with simple launch config:

{
   "command": "npm start",
   "name": "Run npm start",
   "request": "launch",
   "type": "node-terminal",
   "multipleSessionWarning": false
}

This is available in VSCode Insiders today.

Related