formulahendry / formulahendry/vscode-code-runner

[Bug] Returning file path instead of return value when executing Code Runner

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

Description

Version: 1.84.1 (user setup)
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

![image](https://github.com/formulahendry/vscode-code-runner/assets/31962559/a4d59a86-b364-4ff0-9a28-c1ecc87718df)

**Describe the bug**
The return value is not being shown in the output window. Instead the file path is being shown in the output window.

**To Reproduce**
1. create a file.
2. write a simple hello world function that returns 'hello world' string.

Example is written in Javascript:

function helloWorld() {
return 'Hello World!';
}

helloWorld();

4. run Code Runner

**Actual behavior**
It is returning file path instead of return value.

**Expected behavior**
Output window should return value, such as Hello World!

**Screenshots**
code sample:
![image](https://github.com/formulahendry/vscode-code-runner/assets/31962559/d7cd6822-2037-41b6-a913-e71823410190)
Output:
![image](https://github.com/formulahendry/vscode-code-runner/assets/31962559/8fb7a6a1-df95-4ae6-9255-07ab546e0e23)

This is what is expected. I'm using the Dev Tools console on Edge
![image](https://github.com/formulahendry/vscode-code-runner/assets/31962559/f54ec6f2-e305-408e-a57d-8d40c96299de)

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.