Skip to content

Commit

Permalink
chore: add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
BFergerson committed Oct 12, 2022
1 parent 2cfcc0d commit af2fc85
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,15 @@ class LiveInstrumentManager(

override fun onBreakpointAddedEvent(event: LiveBreakpoint) {
ApplicationManager.getApplication().invokeLater {
log.debug("Breakpoint added: $event")
val fileMarker = SourceMarker.getInstance(project).getSourceFileMarker(event.location.source)
if (fileMarker != null) {
val smId = event.meta["original_source_mark"] as String? ?: return@invokeLater
val inlayMark = SourceMarker.getInstance(project).getSourceMark(smId) ?: return@invokeLater
inlayMark.putUserData(SourceMarkerKeys.INSTRUMENT_ID, event.id)
inlayMark.getUserData(SourceMarkerKeys.STATE_BAR)!!.setLiveInstrument(event)
} else {
log.debug("No file marker found for ${event.location.source}")
}
}
}
Expand Down

0 comments on commit af2fc85

Please sign in to comment.