Comments (25)
I don't understand the previous conversation but it might be related to my issue where I'm trying to have this in my settings:
"phpunit.phpunit": "plugins/versionpress/vendor/bin/phpunit"
// or this:
"phpunit.phpunit": "${workspaceFolder}/plugins/versionpress/vendor/bin/phpunit"
but it's probably not supported – the extension always seems to try an absolute path, I'm getting errors like this:
Error: spawn /${workspaceFolder}/plugins/versionpress/vendor/bin/phpunit ENOENT
or
Error: spawn /plugins/versionpress/vendor/bin/phpunit ENOENT
from vscode-phpunit.
更新了新版。情況和之前的一樣。
辛苦囉。這麼晚了還沒睡。
from vscode-phpunit.
Phar 試試指定 php 路徑
from vscode-phpunit.
謝謝回應。我再試試。
from vscode-phpunit.
我的 command line 可以直接下 php 及 phpunit 照理說都不填應該也可以。
但不管有沒有填,或絕對路徑,還是不行。
[Trace - 7:52:08 PM] Sending request 'TestRunStartedEvent - (1)'.
Params: {
"tests": [
"Shieldon\\IpTraitTest::testSetIp"
]
}
[Trace - 7:52:08 PM] Received response 'TestRunStartedEvent - (1)' in 2ms. Request failed: Request TestRunStartedEvent failed with message: Cannot read property 'id' of undefined (-32603).
phpunit language server 回的訊息。
好想用這個插件呀 ><
from vscode-phpunit.
最後這個訊息看起來應該是正常的啊
你先用composer require phpunit/phpunit
試著執行看看
from vscode-phpunit.
奇怪的是,我試另一款插件是可以跑的
該插件的名字:
蠻奇怪的。
ps. 各種路徑設定包括 PHP 的設定都試過了,ouput 有時有訊息,但看起來是錯誤,但按很多次以後就都是空的沒反應。重啟 VSCode 後再執行會有 output,如下:
[Trace - 9:46:43 AM] Received request 'TestRunStartedEvent - (4)'.
Params: {
"tests": [
"Shieldon\\IpTraitTest::testSetIp"
],
"events": [
{
"type": "test",
"test": "Shieldon\\IpTraitTest::testSetIp",
"state": "running"
}
]
}
[Trace - 9:46:43 AM] Sending response 'TestRunStartedEvent - (4)'. Processing request took 1ms
No result returned.
[Trace - 9:46:43 AM] Received response 'TestRunStartedEvent - (2)' in 6ms.
No result returned.
(node:9072) UnhandledPromiseRejectionWarning: Error: spawn UNKNOWN
at ChildProcess.spawn (internal/child_process.js:357:11)
at Object.spawn (child_process.js:540:9)
at Promise (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:123901)
at new Promise (<anonymous>)
at e.Process.run (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:123813)
at e.TestRunner.<anonymous> (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:122800)
at Generator.next (<anonymous>)
at o (c:\Users\terry\.vscode\extensions\recca0120.vscode-phpunit-2.0.50\server\out\server.js:6:121482)
(node:9072) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9072) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
from vscode-phpunit.
有可能是 windows 路徑的問題 ...
這要再檢查看看了
from vscode-phpunit.
https://github.com/terrylinooo/shieldon
那你把資料夾的路徑還有vscode的設定檔提供給我
我看能不能重現問題
from vscode-phpunit.
好的,我有時間再多試試,有成果再來分享。
from vscode-phpunit.
對了!方便的話,先幫我裝 1.x版的看能不能正常執行
1.x 版我是在 windows 上開發的
from vscode-phpunit.
裝了1.x 一樣錯誤訊息。不過如果設定值留空白。
[Error - 4:25:39 PM] Request workspace/executeCommand failed.
Message: Request workspace/executeCommand failed with message: ENOENT: no such file or directory, open 'c:\Users\terry\AppData\Local\Temp\phpunit-lsp-1558427138919.xml'
Code: -32603
xml 檔案不是讀 workspace 底下的。
from vscode-phpunit.
settings 增加 "phpunit.logpanel": true
輸出會多增加一個 PHPUnit Test Explorer
執行完程式後把訊息提供給我一下
from vscode-phpunit.
[2019-05-26 12:13:28.462] [INFO] Running tests ["Shieldon\\Component\\RobotTest::testSetStrict"]
[2019-05-26 12:13:42.527] [INFO] Running tests ["Shieldon\\Component\\IpTest::testInRange"]
[2019-05-26 12:14:02.427] [INFO] Running tests ["Shieldon\\Component\\IpTest::testDecimalIpv6"]
[2019-05-26 12:14:06.319] [INFO] Running tests ["Shieldon\\Component\\IpTest"]
類似這樣的訊息。
from vscode-phpunit.
@terrylinooo 再試看看,應該至少要看到這個訊息
from vscode-phpunit.
@terrylinooo 看樣子要加個 facebook 好友私聊一下了
from vscode-phpunit.
很歡迎加喔。不過我會發政治文喔。哈哈。還是加賴比較好 @@
from vscode-phpunit.
@terrylinooo 換了一個方案再幫我試看看
from vscode-phpunit.
好喔。感謝。晚點試試。
from vscode-phpunit.
更新之後還是不行。連左邊列表都抓不到了
from vscode-phpunit.
看樣子要加你了 來個 line id
from vscode-phpunit.
看樣子要加你了 來個 line id
staroo
from vscode-phpunit.
@terrylinooo 加你了
from vscode-phpunit.
I also see this same error happen.
from vscode-phpunit.
try version 3.0
from vscode-phpunit.
Related Issues (20)
- cannot debug and be stopped
- Tests status not updating in tests explorer HOT 3
- phpunit.paths setting doesn't resolve path mapping HOT 6
- docker: invalid reference format HOT 3
- Tests are not being detected
- json5 to jsonc in README.md to match vscode's settings.json format
- Problem with path to the test file HOT 2
- Command-line options are not recognized by phpunit HOT 1
- Extension causes high cpu load
- Editor is read-only because the file system of the file is read-only HOT 4
- Not showing all test classes HOT 2
- Could not open input file on Mac HOT 2
- Issue when cwd has spaces in directory name HOT 1
- Option to Remove --teamcity Command-line Argument HOT 1
- phpunit.paths mapping not working with warden/den HOT 1
- Don't show test as failed when failOnRisky and failOnWarning are set to false HOT 1
- Debug test with xdebug HOT 1
- Feature request: adding exclaimation mark to test with warnings to help spotting them
- Extension does not work with PHP 8.3
- Spawn Error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-phpunit.