mirror of
https://github.com/actions/runner.git
synced 2026-01-16 16:58:29 +08:00
fix indexing
This commit is contained in:
@@ -492,8 +492,9 @@ async function handleStoppedEvent(body) {
|
||||
let stepElement = findStepByName(rawStepName);
|
||||
|
||||
if (!stepElement && currentFrame.line > 0) {
|
||||
// Fallback: use step number from Line property (1-indexed, matches data-number)
|
||||
stepElement = findStepByNumber(currentFrame.line);
|
||||
// Fallback: use step number from Line property
|
||||
// Add 1 to account for "Set up job" which is always step 1 in GitHub UI but not in DAP
|
||||
stepElement = findStepByNumber(currentFrame.line + 1);
|
||||
}
|
||||
|
||||
if (stepElement) {
|
||||
@@ -557,8 +558,9 @@ async function loadCurrentDebugState() {
|
||||
let stepElement = findStepByName(rawStepName);
|
||||
|
||||
if (!stepElement && currentFrame.line > 0) {
|
||||
// Fallback: use step number from Line property (1-indexed, matches data-number)
|
||||
stepElement = findStepByNumber(currentFrame.line);
|
||||
// Fallback: use step number from Line property
|
||||
// Add 1 to account for "Set up job" which is always step 1 in GitHub UI but not in DAP
|
||||
stepElement = findStepByNumber(currentFrame.line + 1);
|
||||
}
|
||||
|
||||
if (stepElement) {
|
||||
|
||||
Reference in New Issue
Block a user