Skip to content

Commit 4373e4f

Browse files
committed
debugger fix
1 parent 312271e commit 4373e4f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

FadeBasic/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Debugger would emit exit event during partial budget runs.
12+
1013
### Added
1114
- Everything

FadeBasic/FadeBasic/Launch/DebugSession.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,10 @@ public void StartDebugging(int ops = 0)
12831283
}
12841284

12851285

1286-
SendExitedMessage();
1286+
if (_vm.instructionIndex >= _vm.program.Length || requestedExit)
1287+
{
1288+
SendExitedMessage();
1289+
}
12871290
}
12881291

12891292
}

FadeBasic/FadeBasic/Virtual/VirtualMachine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public IEnumerator<ExecutionState> Execute(int instructionBatchCount = 1000)
135135
}
136136

137137

138-
private bool isSuspendRequested;
138+
public bool isSuspendRequested;
139139
public void Suspend()
140140
{
141141
isSuspendRequested = true;

0 commit comments

Comments
 (0)