Does CLion support #line directives?

Answered

Hi, we have included Duktape in our project and the project ships bundled .c and .h files with #line directives, eg:

duktape.c:

...
#line 1 "duk_replacements.h"
...

This causes a problem when debugging because Intellij obviously can't find these files and shows the assembly instead. Is there a way to point CLion at the correct sources (which are supplied separately and not part of the project?

Or perhaps there is a way to tell gdb to ignore these directives and report the actual filename?

Thanks

0
1 comment

Hello! 

In general you can help CLion to find headers mentioned in #include statements using the include_directories() command, please see https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html#include.

As for the #line directive: feel free to comment or upvote https://youtrack.jetbrains.com/issue/CPP-4451 about supporting it. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

0

Please sign in to leave a comment.