add logging for url handling (#142685)

pull/137125/head
Benjamin Pasero 2022-02-10 14:13:03 +01:00
parent 5d37c8c6d9
commit 60b8611fb1
No known key found for this signature in database
GPG Key ID: E6380CC4C8219E65
1 changed files with 4 additions and 0 deletions

View File

@ -801,8 +801,11 @@ export class CodeApplication extends Disposable {
const app = this;
const environmentService = this.environmentMainService;
const productService = this.productService;
const logService = this.logService;
urlService.registerHandler({
async handleURL(uri: URI, options?: IOpenURLOptions): Promise<boolean> {
logService.trace('app#handleURL: ', uri.toString(true), options);
if (uri.scheme === productService.urlProtocol && uri.path === 'workspace') {
uri = uri.with({
authority: 'file',
@ -818,6 +821,7 @@ export class CodeApplication extends Disposable {
// Check for URIs to open in window
const windowOpenableFromProtocolLink = app.getWindowOpenableFromProtocolLink(uri);
logService.trace('app#handleURL: windowOpenableFromProtocolLink = ', windowOpenableFromProtocolLink);
if (windowOpenableFromProtocolLink) {
const [window] = windowsMainService.open({
context: OpenContext.API,