Custom Debug plugin

I tried to create a theia debug plugin by following the instructions here:

When I compile the code, I could see some compilation errors:

$ yarn
yarn install v1.7.0
warning package.json: License should be a valid SPDX license expression
warning debug-plugin@0.0.1: License should be a valid SPDX license expression
[1/5] Validating package.json…
warning debug-plugin@0.0.1: The engine “theiaPlugin” appears to be invalid.
[2/5] Resolving packages…
success Already up-to-date.
$ yarn run clean && yarn run build
yarn run v1.7.0
warning package.json: License should be a valid SPDX license expression
$ rimraf lib
Done in 0.50s.
yarn run v1.7.0
warning package.json: License should be a valid SPDX license expression
$ yarn run format-code && yarn run compile && theia-plugin pack
warning package.json: License should be a valid SPDX license expression
$ tsfmt -r
warning package.json: License should be a valid SPDX license expression
$ tsc
node_modules/@theia/plugin/src/theia.d.ts:8157:19 - error TS2304: Cannot find name ‘Comment’.
8157 comments: Comment[];
node_modules/@theia/plugin/src/theia.d.ts:8312:80 - error TS2304: Cannot find name ‘Comment’.
8312 createCommentThread(id: string, resource: Uri, range: Range, comments: Comment[]): CommentThread;
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

[original thread by rs]

@abazko @florentbenoit maybe you can help

[Anatoliy Bazko]

Those samples are required to be updated :frowning:
I suggest you to have a look at debugger [1] for Apache Pig [2]. I used it for the recent Theia Dev conference. It can be packed as VSIX archive (run vsce package command in a terminal).
Let me know if you have any questions.

[1] https://github.com/tolusha/apache-pig-vscode-extension
[2] https://pig.apache.org/

[Leonardo Freccero]

Hiya!

Im new here so bear with me :slight_smile:
I dont really see how this helps if you want to use the functionality from @theia/plugin?
To my understanding, the code you shared does not use this package, correct me if im wrong :slight_smile:

Personally I need some of the functionality that @theia/plugin offers (such as env.getQueryParameter(’’)) thus the solution above would not work for me (would be happy to be wrong tho).
I also have the same issue as the original poster, although im following the instructions on:
https://www.theia-ide.org/doc/authoring_plugins
Let me know if I should create an issue or something like that for this or if there is one already.
Ill attach the output of my plugin generation procedure

[Leonardo Freccero]

please file an issue here: https://github.com/eclipse/theia-generator-plugin

[Leonardo Freccero]

done, let me know if i should add something to it

[Leonardo Freccero]

Here is the issue: https://github.com/eclipse/theia-generator-plugin/issues/19