OpenLiberty / liberty-tools-vscode

Visual Studio Code extension for Liberty Tools
https://marketplace.visualstudio.com/items?itemName=Open-Liberty.liberty-dev-vscode-ext
Eclipse Public License 2.0
17 stars 32 forks source link

SVT:Attach Debugger not working for multi-module project #204

Open rumanaHaque opened 1 year ago

rumanaHaque commented 1 year ago

I have the multi-module project ACME running in VSCode, and I can start and stop the application successfully using the "Start" and "Stop" commands. I am running my App locally on my Mac laptop.

However, after I start my application, I cannot "Attach debugger" to it. It fails with this error:

image

I get this message even though my liberty server has started successfully, and I see the message that it is running in Dev mode - as shown below:

[INFO] [AUDIT   ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 33.559 seconds.
[INFO] CWWKM2015I: Match number: 1 is [12/12/22 13:43:22:654 CST] 0000002c com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 33.559 seconds..
[INFO] ************************************************************************
[INFO] *    Liberty is running in dev mode.
[INFO] *        Automatic generation of features: [ Off ]
[INFO] *        h - see the help menu for available actions, type 'h' and press Enter.
[INFO] *        q - stop the server and quit dev mode, press Ctrl-C or type 'q' and press Enter.
[INFO] *        
[INFO] *    Liberty server port information:
[INFO] *        Liberty debug port: [ 7777 ]
[INFO] ************************************************************************
kathrynkodama commented 1 year ago

Related to https://github.com/OpenLiberty/liberty-tools-vscode/issues/98

ragudiko commented 1 year ago

@TrevCraw is there any sample multimodule project used while testing multimodule feature

ragudiko commented 1 year ago

@rumanaHaque While reproducing the issue I used acme project shared by you. I observed that the code looks for server.env in target folder under project root. It fails to find it and hence throws "The Liberty server may not have been started" error.

When I further analyzed the issue further i found following observations 1> When loading project onto liberty dashboard, I see acme listed. The pom at project root folder fails to be validated as parent pom and gets validated non-parent pom. There are separate validations for parent pom and non parent pom file. 2>when we trigger start server event using context menu, it starts and creates target folder under child module(AcmeWebEjbEar) which has liberty/config/server.xml. 3) If I copy target folder created in step 2 to root post starting the server and then run attach debugger, it successfully attaches debugger as shown in attached screenshot.

image
DoloresLopez commented 1 year ago

Dolores Lopez is the project's PM

rumanaHaque commented 10 months ago

Still seeing this error using the latest VSCode driver for Liberty Tools 23.0.12, using TER - https://github.ibm.com/websphere/system-test/issues/922.