SoLatch is a VSCode debugging extension that attaches to unstarted processes. It watches running processes for a command-line pattern and starts a CodeLLDB attach session when a match appears.
- Wait for a future process without racing the launch or adding temporary
sleepcalls just to attach the debugger. - Match target processes by regular expression against their command line.
- Start monitoring either from the Command Palette or from a reusable debug configuration.
- Reuse recent process patterns when attaching from the Command Palette.
- Cancel the wait from the VS Code progress notification or debug toolbar.
SoLatch delegates the real debugging session to CodeLLDB, published as vadimcn.vscode-lldb.
Because of that, supported languages, platforms, debugger features, and attach behavior come from CodeLLDB. SoLatch only adds the waiting layer before the CodeLLDB attach session starts.
Use this mode when you want to attach once without creating a launch configuration.
- Open the VS Code Command Palette.
- Run
SoLatch: Attach to Unstarted Process. - Select a recent process pattern or choose
Enter new process pattern. - Enter a regular expression that matches the target process command line.
- Start the target process.
SoLatch shows a cancellable progress notification while it waits. When a matching process starts, SoLatch launches a CodeLLDB attach session for that process.
Use this mode when the same process pattern should be part of your normal Run and Debug workflow.
Add a so-latch attach configuration to .vscode/launch.json:
{
"type": "so-latch",
"request": "attach",
"name": "SoLatch: Attach to Server",
"processPattern": "my-server(\\s|$)",
"haltOnAttach": false,
"ignoreCommonJvmSignals": false
}Run the configuration from VS Code as usual. VS Code starts an inline SoLatch facade debug session first. That session waits until a process matches processPattern, then starts the real CodeLLDB attach session and forwards control to it. Stopping the facade session cancels the wait.
Extension-specific fields:
processPattern: regular expression matched against each process command line.haltOnAttach: whentrue, asks CodeLLDB to stop the process immediately after attaching.ignoreCommonJvmSignals: whentrue, configures CodeLLDB to ignore common JVM signals such asSIGSEGV,SIGBUS; useful when attaching to JVM-based applications.
The scripts directory includes createTestRustProcess.sh, which compiles and starts a small Rust process named test_rust_process you can use to check that SoLatch properly detects and attaches to a new process.
The extension comes with a soLatch.logging.level configuration option, which you may need to adjust while investigating problems related to the extension itself. Supported values are debug, info, warning, and error (the default is info).
SoLatch is licensed under the MIT License. See LICENSE for details.