You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference-manual/native-image/guides/debug-native-executables-with-gdb.md
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,7 @@ A generated native executable is heavily optimized code with minimal symbol info
11
11
This can be solved by embedding debug information into the resulting binary at build time.
12
12
This information tells the debugger precisely how to interpret the machine code and point it back to the original Java method.
13
13
14
-
If your Java application deployed as a native executable behaves differently than expected, you can interactively debug a running process:
15
-
16
-
- using the standard Linux GNU Debugger (GDB);
17
-
- using the built-in Java debugging in VS Code enabled with the [GraalVM Tools for Java extension](https://marketplace.visualstudio.com/items?itemName=oracle-labs-graalvm.graalvm).
18
-
19
-
In this guide you will learn how to debug a native executable using GDB.
14
+
In this guide you will learn how to debug a native executable using the standard Linux GNU Debugger (GDB).
20
15
21
16
> Note: Native Image debugging with GDB currently works on Linux with initial support for macOS. The feature is experimental.
22
17
@@ -128,5 +123,4 @@ Read more about Native Image debugging support from the [reference documentation
128
123
129
124
### RelatedDocumentation
130
125
131
-
- [DebugInfoFeature](../DebugInfo.md)
132
-
- [Debug a running native image process from VSCode](../../../tools/vscode/graalvm/native-image-debugging.md)
The **Download & Install GraalVM** action is recommended as it eliminates the fuss around setting up environment variables for you.
49
49
@@ -72,11 +72,11 @@ The wizard downloads the package from [Github](https://github.com/graalvm/graalv
72
72
73
73
Once the installation completes, the **Install Optional GraalVM Components** window pops up prompting you to install additional language runtimes and utilities (Native Image, JavaScript, Node.js, LLVM, Python, Ruby, etc.) to the core package:
You are sent an email to verify your email address and accept the license.
98
98
@@ -102,15 +102,14 @@ Follow these steps to download and install GraalVM Enterprise:
102
102
103
103
8. Return to VS Code and press **Continue Download** to continue. Your download token is then generated and saved by default in the `.gu/config` file in user's home directory (you can update the storage location later, see below).
The download and installation of GraalVM Enterprise starts.
109
108
The installation wizard downloads a package from Oracle's storage point.
110
109
111
110
If you clicked **Continue Download** without accepting the license, you would see the following warning:
112
111
113
-
<imgsrc="images/continue_download_not_accepted.png"alt="Continue Download without license acceptance"style="width: 50%;">
112
+

114
113
115
114
> Note: If your machine is behind a proxy, you must set your environment variables (`http_proxy`, `https_proxy`) appropriately. You can use the quick command **Setup Proxy**.
116
115
@@ -124,11 +123,11 @@ Once copied you can re-use the download token, for example, (1) to install Graal
124
123
125
124
1. Go to **View**, then **Command Palette** and search for **GraalVM: Show GU Configuration**:
@@ -150,7 +149,7 @@ When the installation is complete, the **Set Default Java** action is invoked.
150
149
151
150
2. Select both **Set as JAVA for Terminal** options (`JAVA_HOME` and `PATH`) in the **Configure active GraalVM** window:
152
151
153
-
<imgsrc="images/set_as_java_for_terminal.png"alt="Set as JAVA for Terminal"style="width: 50%;">
152
+

154
153
155
154
Alternatively, you can invoke the same action from **View**, then **Command Palette** (use the `Ctrl+Shift+P` hot keys combination for Linux, and `Command+Shift+P` for macOS to open the commands palette), and search for "GraalVM".
156
155
You see **GraalVM: Set Active GraalVM Installation** among other actions.
@@ -172,7 +171,7 @@ VisualVM brings powerful yet easy-to-use visual Java tooling to VS Code.
172
171
When you run a Java application, the process ID is detected automatically and displayed in the **VISUALVM** pane.
173
172
Open VisualVM by just clicking the play button:
174
173
175
-
<imgsrc="images/open_visualvm.png"alt="VisualVM and VS Code Integration"style="width: 50%;">
174
+

176
175
177
176
For more information, see the [dedicated guide](visualvm-integration.md) how to start using VisualVM from within VS Code.
178
177
@@ -186,7 +185,7 @@ Thanks to [GraalVM Tools for Java](https://marketplace.visualstudio.com/items?it
186
185
187
186
GraalVM Tools for Java extension provides the **NATIVE IMAGE** with **Agent** pane to automate the process of tracking and registering dynamic feature calls, making it easier to configure and build a native executable in VS Code. The [tracing agent](../../../reference-manual/native-image/AutomaticMetadataCollection.md) tracks dynamic feature calls whilst your application is running on a JVM, and records those calls into JSON configuration files.
> Note: The state is not remembered: if you close the VS Code window, it will change back to **disabled**.
209
208
@@ -240,7 +239,7 @@ For Windows users, the extension provides a pre-configured x64 command prompt us
240
239
241
240
1. In the **NATIVE IMAGE** pane, click on right arrow, **>**:
242
241
243
-
<img src="images/ni_pane_windows.png" alt="NATIVE IMAGE page on Windows" style="width: 50%;">
242
+

244
243
245
244
It opens a dialog window asking you to selectan existing Windows SDK build tools configuration script (`vcvars64.bat`) from the default installation location, or to selecta custom configuration script. VS Code detects the script and pre-populate the path.
246
245
@@ -257,17 +256,6 @@ For Windows users, the extension provides a pre-configured x64 command prompt us
257
256
258
257
Learn more about GraalVM Native Image [here](../../../reference-manual/native-image/README.md).
259
258
260
-
### Debugging
261
-
262
-
The GraalVM Tools forJava provide Java-like debugging of a native executablein a running state directly from within VS Code.
263
-
You can set breakpoints, inspect the state of your application, even attach the debugger to a native image process in VS Code and step over the Java application source code.
264
-
265
-
<img src="images/debugging_ni_vscode.png" alt="Native Image Debugging in VS Code">
266
-
267
-
> Note: To debug a native executable from within VS Code, you must install GraalVM Enterprise.
268
-
269
-
Learn more and find a demo application in the [Native Image Debugging guide](native-image-debugging.md).
270
-
271
259
## Extension Settings
272
260
273
261
The GraalVM Tools forJava extension contributes the following settingsin VS Code:
0 commit comments