Skip to content

Commit

Permalink
feat: provide adapterExecutable and adapterRoot in the debugger service
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 25, 2020
1 parent 008d1d9 commit acd9a6c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/debugger/node/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
NuclideDebuggerProvider,
} from '@atom-ide-community/nuclide-debugger-common/types';
import * as React from 'react';

import { resolve as pathResolve } from 'path';
import {AutoGenLaunchAttachProvider} from '@atom-ide-community/nuclide-debugger-common/AutoGenLaunchAttachProvider';

export function createNodeDebuggerProvider(): NuclideDebuggerProvider {
Expand Down Expand Up @@ -108,10 +108,20 @@ function getNodeConfig(): AutoGenConfig {
visible: true,
};

const adapterExecutable = {
command: 'node',
args: [
pathResolve('./VendorLib/vscode-node-debug2/out/src/nodeDebug.js')
],
}
const adapterRoot = pathResolve('./VendorLib/vscode-node-debug2')

return {
launch: {
launch: true,
vsAdapterType: 'node',
adapterExecutable,
adapterRoot,
properties: [
program,
cwd,
Expand Down Expand Up @@ -144,6 +154,8 @@ function getNodeConfig(): AutoGenConfig {
attach: {
launch: false,
vsAdapterType: 'node',
adapterExecutable,
adapterRoot,
properties: [port],
scriptExtension: '.js',
header: <p>Attach to a running node.js process</p>,
Expand Down

0 comments on commit acd9a6c

Please sign in to comment.