...
- Navigate to the Run and Debug view (left side toolbar).
- Click the Gear icon to open the launch.json file or click the "create a launch.json file" link if that link is visible.
Add the following configuration:
Code Block { "type": "java", "name": "FE Test Attach", "request": "attach", "hostName": "localhost", "port": 8000, "projectName": "impala-frontend" }
- Follow the steps in Debugging front-end test to launch a JVM that will listen for a debugger connection before continuing.
- In VSCode, navigate to the Run and Debug view again and launch "FE Test Attach (fe)".
Remote Debug Frontend
The frontend JVM opens a port for remote debugging starting with port 30000 for coordinator 0 and incrementing by 1 for each coordinator (30001 for coordinator 1, 30002 for coordinator 2, etc). Thus, the best way to debug the front end is to start a single node Impala cluster thus ensuring the frontend remote debugging port will be 30000.
Then, set up VSCode as follows:
- Navigate to the Run and Debug view (left side toolbar).
- Click the Gear icon to open the launch.json file or click the "create a launch.json file" link if that link is visible.
Add the following configuration:
Code Block { "type": "java", "name": "Coordinator 0 FE Debug", "request": "attach", "hostName": "localhost", "port": 30000, "projectName": "impala-frontend" }
- Set breakpoints as needed in the frontend java code.
- In the left-side activity bar, click "Run and Debug".
- Select "Coordinator 0 FE Debug" from the drop-down.
- Click the "Start Debugging" button. When queries are submitted, code execution will pause on the breakpoints.
Using Dev Container (Developing Inside Docker Container)
...