Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add separate "debug" code lens #1200

Merged

Conversation

@marek1840
Copy link
Collaborator

marek1840 commented Dec 18, 2019

Closes #1188
Previously, there was no way to run program and ignore the breakpoints.
Now, we introduce a separate command StartRunSession which ignores the breakpoint requests altogether.
Both commands (StartRunSession and StartDebugSession) are shown to the user as separate code lenses.

TODO: rebase after #1010 gets merged

@marek1840 marek1840 force-pushed the marek1840:issue/1188/separate-lens-for-debugging branch from e038e64 to eb07866 Dec 19, 2019
@marek1840 marek1840 marked this pull request as ready for review Dec 20, 2019
@marek1840 marek1840 requested review from olafurpg and tgodzik Dec 20, 2019
@tgodzik
tgodzik approved these changes Jan 2, 2020
Copy link
Collaborator

tgodzik left a comment

LGTM - I just have one small question

private def convert(line: Int, lenses: Seq[l.CodeLens]): l.TextEdit = {
val pos = new l.Position(line, 0)
val edit = lenses.map(print).mkString
new l.TextEdit(new l.Range(pos, pos), edit + "\n")

This comment has been minimized.

Copy link
@tgodzik

tgodzik Jan 2, 2020

Collaborator

Will it not be a problem on windows by any chance?

This comment has been minimized.

Copy link
@marek1840

marek1840 Jan 7, 2020

Author Collaborator

Changed to System.lineSeparator

Previously, there was no way to run program and ignore the breakpoints.
Now, we introduce a separate command `StartRunSession` which ignores
the breakpoint requests altogether.
Both commands (`StartRunSession` and `StartDebugSession`) are shown to
the user as separate code lenses.
@marek1840 marek1840 force-pushed the marek1840:issue/1188/separate-lens-for-debugging branch from eb07866 to 7204180 Jan 7, 2020
@marek1840

This comment has been minimized.

Copy link
Collaborator Author

marek1840 commented Jan 7, 2020

The failure seems unrelated:

[error] Failed tests:
[error] 	tests.worksheets.WorksheetLspSuite
@marek1840 marek1840 merged commit 2f85d7f into scalameta:master Jan 7, 2020
12 checks passed
12 checks passed
windows-latest jdk-11 unit tests
Details
macOS-latest jdk-11 unit tests
Details
ubuntu-latest jdk-8 unit tests
Details
ubuntu-latest jdk-11 unit tests
Details
Sbt integration
Details
Maven integration
Details
Gradle integration
Details
Mill integration
Details
Pants integration
Details
LSP integration tests
Details
Scala cross tests
Details
Scalafmt/Scalafix/Docs
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.