I have set up debugging in all Kibana source code so that breakpoints work. I cannot get breakpoints working for my plugin code though. Here's what I've done so far.
- Cloned Kibana
- Got debugging working after huge effort
- Created plugin in src/plugins/my_plugin_name using
node scripts/generate_plugin my_plugin_name
- Answered yes to "Will this plugin be part of the Kibana repository?"
- Chose Kibana OSS from list
- Answered yes to "Will this plugin be part of the Kibana repository?"
- Answered yes to "Should a server plugin be generated?"
- Trying to set up debugging for plugin...
Not sure what info you need to be able to help, I've been creating and/or modifying tsconfig.json file(s) in many different configurations hoping that my plugin breakpoints will turn red when the debugger is running (breakpoints in the rest of Kibana code outside my plugin are red). I've tried setting up my tsconfig.json the same way other plugins inside src/plugins have it set up but it is not working.
This is what the tsconfig.json in my plugin root folder looks like after considerable amounts of troubleshooting:
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"jsx": "react",
"outDir": "./target",
"skipLibCheck": true,
"composite": true
},
"include": [
"index.ts",
"common/**/*.ts",
"public/**/*.ts",
"public/**/*.tsx",
"server/**/*.ts",
"../../typings/**/*",
],
"exclude": [],
"references": [],
"composite": true
}
This is what the tsconfig.json in the Kibana root looks like:
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "./build/tsbuildinfo/kibana",
"lib": [
"dom",
"DOM.Iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
},
"include": [
"src",
"kibana.d.ts",
"src/**/*",
"plugins/**/*",
"typings/**/*",
"test_utils/**/*"
],
"exclude": [
// In the build we actually exclude **/public/**/* from this config so that
// we can run the TSC on both this and the .browser version of this config
// file, but if we did it during development IDEs would not be able to find
// the tsconfig.json file for public files correctly.
// "src/**/public/**/*"
],
"references": [
{ "path": "./src/test_utils/tsconfig.json" },
{ "path": "./src/core/tsconfig.json" },
{ "path": "./src/plugins/kibana_utils/tsconfig.json" },
{ "path": "./src/plugins/kibana_react/tsconfig.json" },
{ "path": "./src/plugins/my_plugin_name/tsconfig.json" },
],
}
Can someone help me set this up correctly please?