The path substitutions are intially handled in "setPathSubstitutions" (i.e., gdb.ts and lldb.ts) by adding specific debugger commands (e.g., "set substitute-path" for GDB), to the list of "extraCommands" in miDebugger. However, these extra commands are only sent to the backend for the "launch" configuration, but not for the "attach". It appears the only place the "extraCommands" are referenced are in "MI2.initCommands", which is only invoked from the "MI2.load" API (which corresponds to the "launch" configuration). It is likely "initCommands" should also be called from the "MI2.connect" and "MI2.attach" APIs as well, which correspond to the "attach" configuration.