Skip to content

Commit 35740f7

Browse files
committed
Exception info basic test
1 parent 3fc2a69 commit 35740f7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/adapter.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,4 +946,21 @@ describe('PHP Debug Adapter', () => {
946946
await client.assertOutput('console', 'skipping entry point')
947947
})
948948
})
949+
950+
describe('exception info', () => {
951+
it('should show exception info', async () => {
952+
const program = path.join(TEST_PROJECT, 'error.php')
953+
954+
await client.launch({ program })
955+
await client.setExceptionBreakpointsRequest({ filters: ['Exception'] })
956+
const [, { threadId }] = await Promise.all([
957+
client.configurationDoneRequest(),
958+
assertStoppedLocation('exception', program, 12),
959+
])
960+
const response = await client.exceptionInfoRequest({ threadId })
961+
assert.equal(response.body.exceptionId, 'Exception')
962+
assert.equal(response.body.description, 'this is an exception')
963+
await Promise.all([client.continueRequest({ threadId }), client.waitForEvent('terminated')])
964+
})
965+
})
949966
})

0 commit comments

Comments
 (0)