Skip to content

Commit 6714dc1

Browse files
committed
Add a comment for showing the Ruby backtrace outside a Ruby node when debugging
1 parent 109f761 commit 6714dc1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/truffleruby/language/backtrace/BacktraceFormatter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ public static BacktraceFormatter createDefaultFormatter(RubyContext context) {
6969

7070
// For debugging:
7171
// org.truffleruby.language.backtrace.BacktraceFormatter.printableRubyBacktrace(getContext(), this)
72+
// When outside a Ruby node:
73+
// org.truffleruby.language.backtrace.BacktraceFormatter.printableRubyBacktrace(RubyLanguage.getCurrentContext(), null)
7274
public static String printableRubyBacktrace(RubyContext context, Node node) {
7375
final BacktraceFormatter backtraceFormatter = new BacktraceFormatter(context, EnumSet.of(FormattingFlags.INCLUDE_CORE_FILES));
7476
final String backtrace = backtraceFormatter.formatBacktrace(null, context.getCallStack().getBacktrace(node));

0 commit comments

Comments
 (0)