Skip to content

Commit 5507f5d

Browse files
authored
Refactor to move debugger files (#2850)
* Refactor to move files * Fix references * Fix imports * Fix paths to imporst * Fixed registrations * Fix renames
1 parent f5ba752 commit 5507f5d

54 files changed

Lines changed: 272 additions & 469 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"name": "Debugger as debugServer",
2323
"type": "node",
2424
"request": "launch",
25-
"program": "${workspaceFolder}/out/client/debugger/mainV2.js",
25+
"program": "${workspaceFolder}/out/client/debugger/debugAdapter/main.js",
2626
"stopOnEntry": false,
2727
"smartStep": true,
2828
"args": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
]
299299
},
300300
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
301-
"program": "./out/client/debugger/mainV2.js",
301+
"program": "./out/client/debugger/debugAdapter/main.js",
302302
"runtime": "node",
303303
"configurationSnippets": [
304304
{

src/client/debugger/Common/Contracts.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

src/client/debugger/Common/telemetry.ts

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'use strict';
55

66
import * as path from 'path';
7-
import { EXTENSION_ROOT_DIR } from '../../common/constants';
7+
import { EXTENSION_ROOT_DIR } from '../common/constants';
88

99
export const PTVSD_PATH = path.join(EXTENSION_ROOT_DIR, 'pythonFiles', 'experimental', 'ptvsd');
1010
export const DebuggerTypeName = 'python';
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
'use strict';
5+
6+
// tslint:disable:interface-name member-access no-single-line-block-comment no-any no-stateless-class member-ordering prefer-method-signature no-unnecessary-class
7+
8+
import { OutputEvent } from 'vscode-debugadapter';
9+
import { DebuggerPerformanceTelemetry, DebuggerTelemetry } from '../../../telemetry/types';
10+
11+
export class TelemetryEvent extends OutputEvent {
12+
body!: {
13+
/** The category of output (such as: 'console', 'stdout', 'stderr', 'telemetry'). If not specified, 'console' is assumed. */
14+
category: string;
15+
/** The output to report. */
16+
output: string;
17+
/** Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format. */
18+
data?: any;
19+
};
20+
constructor(output: string, data?: DebuggerTelemetry | DebuggerPerformanceTelemetry) {
21+
super(output, 'telemetry');
22+
if (data) {
23+
this.body.data = data;
24+
}
25+
}
26+
}
27+
export interface IDebugServer {
28+
port: number;
29+
host?: string;
30+
}
File renamed without changes.

src/client/debugger/Common/debugStreamProvider.ts renamed to src/client/debugger/debugAdapter/Common/debugStreamProvider.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
import { inject, injectable } from 'inversify';
55
import { createServer, Socket } from 'net';
6-
import { isTestExecution } from '../../common/constants';
7-
import { ICurrentProcess } from '../../common/types';
8-
import { IServiceContainer } from '../../ioc/types';
6+
import { isTestExecution } from '../../../common/constants';
7+
import { ICurrentProcess } from '../../../common/types';
8+
import { IServiceContainer } from '../../../ioc/types';
99
import { IDebugStreamProvider } from '../types';
1010

1111
@injectable()
1212
export class DebugStreamProvider implements IDebugStreamProvider {
13-
constructor( @inject(IServiceContainer) private readonly serviceContainer: IServiceContainer) { }
13+
constructor(@inject(IServiceContainer) private readonly serviceContainer: IServiceContainer) { }
1414
public get useDebugSocketStream(): boolean {
1515
return this.getDebugPort() > 0;
1616
}

src/client/debugger/Common/processServiceFactory.ts renamed to src/client/debugger/debugAdapter/Common/processServiceFactory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
'use strict';
55

66
import { inject, injectable } from 'inversify';
7-
import { ProcessService } from '../../common/process/proc';
8-
import { IBufferDecoder, IProcessService, IProcessServiceFactory } from '../../common/process/types';
9-
import { IServiceContainer } from '../../ioc/types';
7+
import { ProcessService } from '../../../common/process/proc';
8+
import { IBufferDecoder, IProcessService, IProcessServiceFactory } from '../../../common/process/types';
9+
import { IServiceContainer } from '../../../ioc/types';
1010

1111
@injectable()
1212
export class DebuggerProcessServiceFactory implements IProcessServiceFactory {
File renamed without changes.

0 commit comments

Comments
 (0)