Skip to content

feat: display line numbers in debugger stack frame elements#1384

Merged
sebthom merged 1 commit intoeclipse-lsp4e:mainfrom
sebthom:issue-627
Nov 13, 2025
Merged

feat: display line numbers in debugger stack frame elements#1384
sebthom merged 1 commit intoeclipse-lsp4e:mainfrom
sebthom:issue-627

Conversation

@sebthom
Copy link
Copy Markdown
Member

@sebthom sebthom commented Nov 12, 2025

Fixes #627

image

}
}
} catch (final Exception ex) {
// Ignore - if we cannot get a line number, skip the suffix
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not clear what exception would be raised that would be expected. It looks to me that if we reach the catch block we should rather log the error. Could we do that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me neither. I just wondered if for some debug servers the sourcename could contain anything that makes new Path(source) throw.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only case I can see where there would be an exception is when source is null. What about checking that source != null and logging the exception? I am not worried about having too many logs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, if we check for source != null, I think I would remove the try block and let whatever unexpected exception might happen just propagate

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually getLineNumber() can throw exceptions too. I am logging the exception at warning level now.

Copy link
Copy Markdown
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you log the error rather than silently ignoring it?

@sebthom
Copy link
Copy Markdown
Member Author

sebthom commented Nov 13, 2025

Could you log the error rather than silently ignoring it?

I could but if errors are thrown there might be a lot of them and since it is optional info I thought suppressing is ok.

Copy link
Copy Markdown
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@sebthom sebthom merged commit e7a6e6e into eclipse-lsp4e:main Nov 13, 2025
11 checks passed
@sebthom sebthom deleted the issue-627 branch November 13, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Debug] show line on stackframe element

2 participants