swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
726 stars 50 forks source link

Activate the extension when starting debugging #673

Closed tristanlabelle closed 6 months ago

tristanlabelle commented 6 months ago

In Swift projects using CMake as the build system, the Swift extension doesn't auto-start when debugging, resulting in the below:

image

onDebugInitialConfiguration might also be useful since the Java extension does this, but I'm not sure how to test it and the current change solves the problem I'm after.

How tested: tried starting debugging before and after.

tristanlabelle commented 6 months ago

@adam-fowler I think onDebugInitialConfiguration is rather when you don't have a launch.json file, press F5, and the extension is supposed to contextually figure out a debug configuration (for example single-file debugging in a shell language)