zed-industries/zed · error
No process selected with config that contains {}
Error message
No process selected with config that contains {} What it means
Attach-to-process flow: when the resolved debug config still contains the processId placeholder, Zed opens the AttachModal with a oneshot channel to receive a PID; if the modal is dismissed (or nothing is selected) the channel yields None and the session aborts with this message before substituting the PID (running.rs:1102).
Source
Thrown at crates/debugger_ui/src/session/running.rs:1102
let (tx, rx) = futures::channel::oneshot::channel::<Option<i32>>();
let weak_workspace_clone = weak_workspace.clone();
weak_workspace.update_in(cx, |workspace, window, cx| {
let project = workspace.project().clone();
workspace.toggle_modal(window, cx, |window, cx| {
AttachModal::new(
ModalIntent::ResolveProcessId(Some(tx)),
weak_workspace_clone,
project,
true,
window,
cx,
)
});
}).ok();
let Some(process_id) = rx.await.ok().flatten() else {
bail!("No process selected with config that contains {}", PROCESS_ID_PLACEHOLDER.as_str())
};
Self::substitute_process_id_in_config(&mut config, process_id);
}
let request_type = match dap_registry
.adapter(&adapter)
.with_context(|| format!("{adapter}: is not a valid adapter name")) {
Ok(adapter) => adapter.request_kind(&config).await,
Err(e) => Err(e)
};
let config_is_valid = request_type.is_ok();
let mut extra_config = Value::Null;
let build_output = if let Some(build) = build {
let (task_template, locator_name) = match build {
BuildTaskDefinition::Template {View on GitHub (pinned to f4178619ac)
Solutions
- Re-run the attach and actually select a process in the modal.
- Confirm the target process is still running and visible to the picker (on Linux/macOS, same-user processes or elevated permissions).
- Skip the modal by putting a concrete `"processId": <pid>` in the config instead of the placeholder.
- For services with fixed ports, prefer a `tcp_connection` attach instead of processId.
Example fix
// before (debug.json — triggers picker; cancel -> error)
{
"adapter": "Python",
"request": "attach",
"config": { "processId": "${0}" }
}
// after (explicit pid, no modal)
{
"adapter": "Python",
"request": "attach",
"config": { "processId": 41235 }
} Defensive patterns
Strategy: try-catch
Validate before calling
// only prompt for a PID when the config actually needs one
let needs_pid = config.to_string().contains(PROCESS_ID_PLACEHOLDER.as_str());
if !needs_pid {
// skip the attach modal entirely
return Ok(config);
} Try / catch
Await the PID channel and branch: `match rx.await.ok().flatten() { Some(pid) => substitute(pid), None => return Err(UserCancelled) }` — model dismissal as a distinct cancel error rather than a generic failure, so UI can stay quiet. Prevention
- Use a fixed processId or port-based attach for services with a known PID/port.
- Ensure the target process is running and selectable before starting attach.
- Treat picker cancellation as user intent, never retry it automatically.
When it happens
Trigger: A debug config containing the `{processId}` placeholder under an attach request, and the user cancels the process picker, or the picker's filtered list is empty so no PID is ever sent through the channel.
Common situations: Target process exits before selection; the process belongs to another user and is filtered out by permissions; users pressing Esc expecting attach to proceed; headless/automation contexts where no one answers the modal.
Related errors
- Cannot have two different hosts in debug configuration
- Cannot have two different ports in debug configuration
- debug config not found in mode: {mode}
- Could not resolve task variables within a debug scenario
- Build failed
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/6494d7070ee73980.
Report an issue: GitHub.