Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Show VARIABLES with different data views. [PR#982](https://github.com/microsoft/vscode-java-debug/pull/982).
- Adopt new APIs from vscode-tas-client. [#974](https://github.com/microsoft/vscode-java-debug/pull/974).

### Changed
- Engineering: Clean up deprecated logs. [PR#987](https://github.com/microsoft/vscode-java-debug/pull/987).

### Fixed
- Breakpoints inside record methods don't work. [#973](https://github.com/microsoft/vscode-java-debug/issues/973).
- Support environment variable for port number in launch.json debug configuration. [#962](https://github.com/microsoft/vscode-java-debug/issues/962).
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,10 @@
"description": "%java.debugger.attach.hostName.description%"
},
"port": {
"type": ["number", "string"],
"type": [
"number",
"string"
],
"description": "%java.debugger.attach.port.description%"
},
"processId": {
Expand Down Expand Up @@ -917,7 +920,6 @@
"compare-versions": "^3.6.0",
"lodash": "^4.17.20",
"uuid": "^8.3.1",
"vscode-extension-telemetry": "^0.1.6",
"vscode-extension-telemetry-wrapper": "^0.9.0",
"vscode-languageclient": "6.0.0-next.9",
"vscode-languageserver-types": "3.16.0",
Expand Down
8 changes: 1 addition & 7 deletions src/configurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import * as anchor from "./anchor";
import { buildWorkspace } from "./build";
import { populateStepFilters, substituteFilterVariables } from "./classFilter";
import * as commands from "./commands";
import { Type } from "./javaLogger";
import * as lsPlugin from "./languageServerPlugin";
import { addMoreHelpfulVMArgs, getJavaVersion, getShortenApproachForCLI, validateRuntimeCompatibility } from "./launchCommand";
import { logger, Type } from "./logger";
import { mainClassPicker } from "./mainClassPicker";
import { resolveJavaProcess } from "./processPicker";
import { IProgressReporter } from "./progressAPI";
Expand Down Expand Up @@ -477,12 +477,6 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
fix: "yes",
fixMessage: errors.join(os.EOL),
});

// Deprecated
logger.log(Type.USAGEDATA, {
fix: "yes",
fixMessage: errors.join(os.EOL),
});
await this.persistMainClassOption(folder, config, selectedFix);
}

Expand Down
8 changes: 0 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { JavaDebugAdapterDescriptorFactory } from "./javaDebugAdapterDescriptorF
import { JavaInlineValuesProvider } from "./JavaInlineValueProvider";
import { logJavaException, logJavaInfo } from "./javaLogger";
import { IMainClassOption, IMainMethod, resolveMainMethod } from "./languageServerPlugin";
import { logger, Type } from "./logger";
import { mainClassPicker } from "./mainClassPicker";
import { pickJavaProcess } from "./processPicker";
import { IProgressReporter } from "./progressAPI";
Expand All @@ -37,12 +36,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
}

function initializeExtension(_operationId: string, context: vscode.ExtensionContext): any {
// Deprecated
logger.initialize(context, true);

registerDebugEventListener(context);
registerVariableMenuCommands(context);
context.subscriptions.push(logger);
context.subscriptions.push(vscode.window.registerTerminalLinkProvider(new JavaTerminalLinkProvder()));
context.subscriptions.push(vscode.debug.registerDebugConfigurationProvider("java", new JavaDebugConfigurationProvider()));
context.subscriptions.push(vscode.debug.registerDebugAdapterDescriptorFactory("java", new JavaDebugAdapterDescriptorFactory()));
Expand Down Expand Up @@ -115,9 +110,6 @@ function registerDebugEventListener(context: vscode.ExtensionContext) {
} else {
logJavaInfo(commonProperties, measureProperties);
}

// Deprecated
logger.log(entry.scope === "exception" ? Type.EXCEPTION : Type.USAGEDATA, commonProperties, measureProperties);
});
}
});
Expand Down
3 changes: 1 addition & 2 deletions src/javaDebugAdapterDescriptorFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Licensed under the MIT license.

import { DebugAdapterDescriptor, DebugAdapterDescriptorFactory, DebugAdapterExecutable, DebugAdapterServer, DebugSession } from "vscode";

import { Type } from "./javaLogger";
import { startDebugSession } from "./languageServerPlugin";
import { Type } from "./logger";
import { convertErrorToMessage, showErrorMessageWithTroubleshooting } from "./utility";

export class JavaDebugAdapterDescriptorFactory implements DebugAdapterDescriptorFactory {
Expand Down
7 changes: 7 additions & 0 deletions src/javaLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

import { sendInfo, sendOperationError } from "vscode-extension-telemetry-wrapper";

export enum Type {
EXCEPTION = "exception",
USAGEDATA = "usageData",
USAGEERROR = "usageError",
ACTIVATEEXTENSION = "activateExtension", // TODO: Activation belongs to usage data, remove this category.
}

export function logJavaException(errorProperties: any): void {
/**
* A sample errorProperties from Java code.
Expand Down
63 changes: 0 additions & 63 deletions src/logger.ts

This file was deleted.

11 changes: 1 addition & 10 deletions src/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import * as path from "path";
import * as vscode from "vscode";
import { sendError, sendInfo, setUserError } from "vscode-extension-telemetry-wrapper";
import { Type } from "./javaLogger";
import { IMainClassOption, resolveMainClass } from "./languageServerPlugin";
import { logger, Type } from "./logger";
import { IProgressReporter } from "./progressAPI";

const TROUBLESHOOTING_LINK = "https://github.com/Microsoft/vscode-java-debug/blob/master/Troubleshooting.md";
Expand Down Expand Up @@ -64,9 +64,6 @@ function logMessage(message: ILoggingMessage): void {
} else {
sendInfo("", { message: message.message });
}

// Deprecated
logger.log(message.type, { message: message.message, stack: message.stack || "" });
}

export async function showInformationMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> {
Expand Down Expand Up @@ -114,12 +111,6 @@ export function openTroubleshootingPage(message: string, anchor?: string) {
troubleshooting: "yes",
troubleshootingMessage: message,
});

// Deprecated
logger.log(Type.USAGEDATA, {
troubleshooting: "yes",
troubleshootingMessage: message,
});
}

export async function guideToInstallJavaExtension() {
Expand Down