在PhpStorm中调试时,我知道您可以右键单击"变量"窗格中的变量,然后选择上下文菜单项"复制值".有没有办法复制数据结构,如数组或对象?
$_GET = {array} [1]
someVariable = "Hello this is a value, and it happens to be a string"
anotherVar = "What is this string"
Run Code Online (Sandbox Code Playgroud)
如果我右键单击'someVariable'并选择'Copy Value',我将在剪贴板上显示该字符串.
如果我右键单击数组中的行并选择"复制值",我的剪贴板上会显示"[1]".
我真正想要的是当我右键单击数组上的"复制值"并在剪贴板上显示这样的内容时:
'[ 'someVariable' = 'Hello this is a value, and it happens to be a string', 'anotherVar' = 'What is this string ]'
Run Code Online (Sandbox Code Playgroud)
任何想法,或有人需要制作这个插件?;)
cga*_*olo 12
从PhpStorm版本9.0.0开始(2015年7月8日发布):
在PhpStorm <9.0.0的情况下,我使用了以下技巧(PhpStorm 8.0.2):
$_GETvar_export($_GET,1).(第二个参数设置为1以返回变量表示而不是输出它)print_r($_GET,1))| 归档时间: |
|
| 查看次数: |
3947 次 |
| 最近记录: |