Enable remote debugging and DSS mapping generation#1491
Enable remote debugging and DSS mapping generation#1491ChinthakaJ98 merged 3 commits intowso2:mainfrom
Conversation
📝 WalkthroughWalkthroughThis pull request reinstates the Generate Mappings buttons in the input and output mapping components by removing conditional wrapping and commented code, and adds a new remote MI launch configuration to the VS Code extension package with server connection fields. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
workspaces/mi/mi-extension/package.json (1)
111-129: Switch remote debug configuration to userequest: "attach"instead of"launch".The debug adapter already supports
attachRequestand handles it identically tolaunchRequest(seedebugAdapter.ts). The semantic distinction between launch and attach is determined byproperties.type, not the request field. VS Code convention is to userequest: "attach"when connecting to an already-running process, making this change more semantically correct without requiring any adapter modifications.Add individual IntelliSense descriptions for nested properties like
commandPort,eventPort,serverHost, etc.Currently, the nested
propertiesobject inconfigurationAttributes.launchis defined only withadditionalProperties: { type: ["string", "number"] }, providing no per-field descriptions or validation in the IDE. Explicitly defining each property underconfigurationAttributes.launch.properties.propertieswould enable proper IntelliSense hints for users editinglaunch.json.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@workspaces/mi/mi-extension/package.json` around lines 111 - 129, Change the debug configuration's request value from "launch" to "attach" for the "MI: Remote Server Run and Debug" configuration (the adapter already treats attach and launch the same based on properties.type), and add explicit per-field entries under the package.json configuration schema (under configurationAttributes.launch.properties.properties) for each nested property: commandPort, eventPort, serverHost, serverPort, serverReadinessPort, managementPort, managementUsername, managementPassword, connectionTimeoutInSecs—provide appropriate "type" (number or string) and a short "description" for each so VS Code shows IntelliSense and proper validation when editing launch.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@workspaces/mi/mi-extension/package.json`:
- Around line 125-126: The launch.json template currently hardcodes
managementUsername and managementPassword (managementPassword: "admin") inside
initialConfigurations which will be written verbatim to .vscode/launch.json;
replace the literal default password with a non-sensitive placeholder (e.g.,
"<management-password>") and/or remove the password entry so users must supply
credentials at setup, updating the initialConfigurations block that references
managementUsername and managementPassword accordingly.
---
Nitpick comments:
In `@workspaces/mi/mi-extension/package.json`:
- Around line 111-129: Change the debug configuration's request value from
"launch" to "attach" for the "MI: Remote Server Run and Debug" configuration
(the adapter already treats attach and launch the same based on
properties.type), and add explicit per-field entries under the package.json
configuration schema (under
configurationAttributes.launch.properties.properties) for each nested property:
commandPort, eventPort, serverHost, serverPort, serverReadinessPort,
managementPort, managementUsername, managementPassword,
connectionTimeoutInSecs—provide appropriate "type" (number or string) and a
short "description" for each so VS Code shows IntelliSense and proper validation
when editing launch.json.
| "managementUsername": "admin", | ||
| "managementPassword": "admin", |
There was a problem hiding this comment.
Default plaintext admin/admin credentials will be written to launch.json.
initialConfigurations are written verbatim to .vscode/launch.json when users first create a debug configuration. Hardcoding managementPassword: "admin" means the credential will appear in a file that is frequently committed to version control. Even though WSO2 MI ships with this default, embedding it in a checked-in template increases the risk of credential exposure.
Consider replacing the default value with a placeholder string (e.g., "<management-password>") to force users to fill in the real value before use.
🔧 Proposed change
- "managementUsername": "admin",
- "managementPassword": "admin",
+ "managementUsername": "<management-username>",
+ "managementPassword": "<management-password>",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "managementUsername": "admin", | |
| "managementPassword": "admin", | |
| "managementUsername": "<management-username>", | |
| "managementPassword": "<management-password>", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@workspaces/mi/mi-extension/package.json` around lines 125 - 126, The
launch.json template currently hardcodes managementUsername and
managementPassword (managementPassword: "admin") inside initialConfigurations
which will be written verbatim to .vscode/launch.json; replace the literal
default password with a non-sensitive placeholder (e.g.,
"<management-password>") and/or remove the password entry so users must supply
credentials at setup, updating the initialConfigurations block that references
managementUsername and managementPassword accordingly.
This PR will fix the issue wso2/mi-vscode#1390
Summary by CodeRabbit
New Features
Bug Fixes