VS Code: Is there some way to associate my debug session to a specific terminal?

Viewed 77

I'm always working with multiple nodejs projects, and every time I debug a new terminal is opened so I'm constantly getting lost on which terminal corresponds to each debug session.

Is there some way to do something like double clicking the debug session in the call stack and open the terminal it corresponds? Any insight would be greatly appreciated.

Thanks.

3 Answers

Based on my personal experience, looking at all the logs in one terminal makes it more confusing. I have a better alternative for you, so let say you are debugging A and B projects.

  • Open A project in one window of VS code and use an integrated terminal
  • Open B project in another window of VS and use integrated terminal and so on...

(To open the integrated terminal, Mac: Cmd + j and for Windows: Ctrl+` )

Windows:

Ctrl + Shift + P

Mac:

Cmd + Shift + p

And running those hotkeys type: Terminal: Rename, now you can change the terminal title

You could also add a keyboard shortcut for this command: workbench.action.terminal.rename

in addition to the answers, my approach is isolate the VS by opening different windows for different sessions, and keep the 2 windows on 2 different monitors, for that you need an extra monitor.

when i had 1 monitor, identifying which window corresponded to which was a time waste task and more of distraction. now attaching extra monitor to laptop has saved me a ton of time, organizing windows and switching between became seamless and of course most importantly, productivity and speed increased around 33%.

Related