formulahendry / formulahendry/vscode-code-runner

stop code run can not stop console

Open
#1,112 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

Type: Bug

function longRunningFunction() {
// 模拟一个执行时间很长的函数
let start = Date.now();
while (Date.now() - start < 5000) {} // 假设这个函数执行时间为5秒钟
console.log("done")
}

setInterval(longRunningFunction, 1000);

In this test case, after run code, it will always output "done", stop code run does not work

Extension version: 0.12.1
VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:57:04.379Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|13th Gen Intel(R) Core(TM) i7-13700K (24 x 3418)|
|GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|31.75GB (20.47GB free)|
|Process Argv|--crash-reporter-id 42d78ad7-3f95-4cb0-b677-62cc7f88e0de|
|Screen Reader|no|
|VM|0%|

A/B Experiments

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:30979542
d34g3935:30971562
bg6jg535:30979843
dsvsc020:30976470
7ghi1836:30988842

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.