Skip to content

Commit 8ec1c6e

Browse files
authored
Fix debugger not starting on windows (#154)
* avoid console warnings when starting the extension on windows elixir -e "" crashes on windows with ** (TokenMissingError) nofile:1:3 missing terminator: "... * properly transform URI to path fixes debugger not starting on windows due to cwd being of invalid form /c%3A/some/folder
1 parent d734514 commit 8ec1c6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let _sortedWorkspaceFolders: string[] | undefined;
2424

2525
function testElixirCommand(command: string): false | Buffer {
2626
try {
27-
return execSync(`${command} -e ""`);
27+
return execSync(`${command} -e " "`);
2828
} catch {
2929
return false;
3030
}
@@ -132,7 +132,7 @@ function configureCopyDebugInfo(context: ExtensionContext) {
132132
class DebugAdapterExecutableFactory implements vscode.DebugAdapterDescriptorFactory {
133133
createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
134134
if (session.workspaceFolder) {
135-
const cwd: string = session.workspaceFolder.uri.toString().replace("file://", "");
135+
const cwd: string = session.workspaceFolder.uri.fsPath;
136136

137137
let options;
138138
if (executable.options) {

0 commit comments

Comments
 (0)