Upgrade WAMR-IDE (#1313)
Upgrade WAMR-IDE: test-tools/wamr-ide folder - add `wamr-sdk` to include libc-builtin-sysroot header files - add `prettier` check and apply script in `package.json` - update `wasm-toolchain` dockerfile and resource - enhance `build | run | debug` process to clean up the container - enhance the change workspace - enhance `wasm` type project check before building, running and debugging - format the project_compilation.json - update documents
This commit is contained in:
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as os from 'os';
|
||||
|
||||
export class WasmDebugConfigurationProvider
|
||||
implements vscode.DebugConfigurationProvider
|
||||
{
|
||||
constructor() {}
|
||||
|
||||
/* default port set as 1234 */
|
||||
private port = 1234;
|
||||
private hostPath!: string;
|
||||
private providerPromise: Thenable<vscode.DebugConfiguration> | undefined =
|
||||
undefined;
|
||||
|
||||
private wasmDebugConfig!: vscode.DebugConfiguration;
|
||||
|
||||
public resolveDebugConfiguration():
|
||||
| Thenable<vscode.DebugConfiguration>
|
||||
| undefined {
|
||||
if (!this.providerPromise) {
|
||||
this.providerPromise = Promise.resolve(this.wasmDebugConfig);
|
||||
return this.providerPromise;
|
||||
}
|
||||
return this.providerPromise;
|
||||
}
|
||||
|
||||
public setDebugConfig(hostPath: string, port: number) {
|
||||
this.port = port;
|
||||
this.hostPath = hostPath;
|
||||
/* linux and windows has different debug configuration */
|
||||
if (os.platform() === 'win32') {
|
||||
this.wasmDebugConfig = {
|
||||
type: 'wamr-debug',
|
||||
name: 'Attach',
|
||||
request: 'attach',
|
||||
['stopOnEntry']: true,
|
||||
['initCommands']: ['platform select remote-linux'],
|
||||
['attachCommands']: [
|
||||
'process connect -p wasm connect://127.0.0.1:' + port + '',
|
||||
],
|
||||
};
|
||||
} else if (os.platform() === 'linux') {
|
||||
this.wasmDebugConfig = {
|
||||
type: 'wamr-debug',
|
||||
name: 'Attach',
|
||||
request: 'attach',
|
||||
['stopOnEntry']: true,
|
||||
['attachCommands']: [
|
||||
'process connect -p wasm connect://127.0.0.1:' + port + '',
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public getDebugConfig() {
|
||||
return this.wasmDebugConfig;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user