Comments (7)
提议在mac下用zsh启动:
utools/plugins/vscode/src/vscode.ts
Line 58 in b974879
现在mac默认shell是zsh, 然后关于个人的PATH设置都是在zsh config里, 用bash启动会导致debug的时候找不到PATH.
当然其实也可以自己设置bash的config...
这个后面可以优化一下,修改一下默认值
from utools.
最新版已支持,shell 可以使用 vsc-setting
修改
from utools.
我发现改了zsh还是不能正确的获得PATH...怎么回事,
我在terminal跑code .能是正常debug的,
但是用插件就会就debug不了了.
from utools.
你这个 debug 的意思是在 vscode 里面运行 debug 命令?
from utools.
你这个 debug 的意思是在 vscode 里面运行 debug 命令?
from utools.
这个要看一下你的环境问题了,按理说这个应该和启动方式关系不大才对
from utools.
用其它插件时无意中想到了一个解决方法.
就是不在node中运行启动脚本, 而是用osascript
去调用本地terminal然后跑命令.
https://github.com/fofolee/uTools-quickcommand/blob/master/src/preload.js#L396
问题原因
在Unix系统中, 不同于Window, 我们一般都是在shell的conf下追加PATH, 比如.zshrc
中追加node路径, 或者其它包路径
然而当我们用zsh -l -c
时它会根据其调用者(当前node)路径进行响应, 在utools中的node是一个沙盒, 它的环境仅仅包含了必要的参数, 没有也理应没有办法拿到用户的个人配置(除非添加设置选项), 那么启动后的vscode找不到软件的路径也就理所当然了.
解决办法
启用一个terminal进程, 让该进程运行code
, 这样就能有效的避免环境丢失的问题.
示例
FoundTheWOUT@e06e705
也许可以加个开关, 比如用本地terminal启动
, 之类的...
其它问题
- Unix系统中, 如果目录路径带有空格, 启动会失效(路径中空格应改为'\ ', 但我想不到什么好办法)
utools.d.ts
中isMacOs
isWindows
isLinux
三个方法应该返回布尔值
from utools.
Related Issues (20)
- 我之前pr 的那个版本好像还没 publish HOT 2
- 打开文件报错 HOT 4
- 提个小建议,希望可以增添多选,比如一次选择三条历史记录恢复 HOT 1
- 希望 vscode 历史项目插件能置顶项目 HOT 3
- process:TypeError: Cannot read property 'configs of undefined HOT 1
- iconfont setting ‘是否精选 / 图标类型 ’ 不能选回 '所有图标 / 全部',提示必填项不能为空 HOT 2
- Error: Command failed: zsh -1-c "code --folder-uri "file://Users/caoqingda/study/code2" HOT 1
- otp添加多个后,能自定义排序吗? HOT 1
- edge关键字
- 语雀搜索找不到了。 HOT 2
- 老哥,语雀搜索呢 HOT 2
- Bug: vscode remote open failed HOT 7
- vscode 1.64.0 的 json 文件修改了,导致无法查到历史了 HOT 4
- vscode 插件 3.4.1 还是没有历史记录 HOT 11
- vscode 更新版本后,vsc历史浏览不能用了 HOT 3
- 插件怎么打包
- 无法正确打开对应的项目 HOT 1
- 插件是最新版本,突然发现vsc插件无法正常打开最近历史项目
- vscode历史搜索每次打开项目都打开cli.js
- Bug: 路径包含`\`无法打开项目 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 utools.