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
Currently, the Kotlin/Native compiler produces debug info compatible with the DWARF 2 specification, so modern debugger tools can
4
-
perform the following operations:
5
-
- breakpoints
6
-
- stepping
7
-
- inspection of type information
8
-
- variable inspection
9
-
10
-
>Supporting the DWARF 2 specification means that the debugger tool recognizes Kotlin as C89, because before the DWARF 5 specification, there is no identifier for the Kotlin language type in specification.
3
+
The Kotlin/Native compiler can generate binaries with debug information, as well as create debug symbol files for [symbolicating
4
+
crash reports](#debug-ios-applications).
5
+
6
+
The debug information is compatible with the [DWARF 2](https://dwarfstd.org/download.html) specification, so modern debugger
7
+
tools, like LLDB and GDB can:
8
+
9
+
*[Set breakpoints](#set-breakpoints)
10
+
*[Use stepping](#use-stepping)
11
+
*[Inspect variable and type information](#inspect-variables)
12
+
13
+
> Supporting the DWARF 2 specification means that the debugger tool recognizes Kotlin as C89, because before the DWARF 5
14
+
> specification, there is no identifier for the Kotlin language type in the specification.
11
15
>
12
16
{style="note"}
13
17
14
-
## Produce binaries with debug info with Kotlin/Native compiler
18
+
## Generate binaries with debug information
19
+
20
+
When debugging in IntelliJ IDEA, Android Studio, or Xcode, binaries with debug information are generated automatically
21
+
(unless the build is configured differently).
22
+
23
+
You can enable debugging manually and produce binaries that include debug information by:
24
+
25
+
***Using Gradle tasks**. To get debug binaries, use `linkDebug*` Gradle tasks, for example:
26
+
27
+
```bash
28
+
./gradlew linkDebugFrameworkNative
29
+
```
30
+
31
+
The tasks differ depending on the binary type (for example, `linkDebugSharedNative`) or your target (for example, `linkDebugExecutableMacosX64`).
15
32
16
-
To produce binaries with the Kotlin/Native compiler, use the ``-g`` option on the command line.
33
+
***Using the command-line compiler**. In the command line, compile your Kotlin/Native binary with the `-g` option:
For more information about crash reports, see the [Apple documentation](https://developer.apple.com/documentation/xcode/diagnosing-issues-using-crash-reports-and-device-logs).
293
+
219
294
## Known issues
220
295
221
-
- performance of Python bindings.
296
+
* Performance of Python bindings.
297
+
* Expression evaluation in debugger tools is not supported, and currently there are no plans for implementing it.
0 commit comments