NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Copy Variable data


Joined: 14 Jun 2013
Posts: 4
Reply with quote
Hi,
Is there a way to copy what a variable is set to in the watch window and paste it to Notepad?

Thanks

Al
View user's profileFind all posts by procheckSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
You can right-click the value then choose Copy from the popup menu. Depending on what format you want the value in, you can also change strings between PHP and raw formats.
View user's profileFind all posts by plugnplaySend private message


Joined: 14 Jun 2013
Posts: 4
Reply with quote
Hi & thanks for the response. I guess I wasn't clear enough. What I want is to copy the variable name also. For example, if an array is set to (5,2), then I would get something
like $array 5,2

Thanks
View user's profileFind all posts by procheckSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Sorry, forgot to answer this Embarassed

Whilst not the most convenient, I type the variable name into the Immediate panel and it dumps the name and the value. The Immediate panel is not very good plus it clears with each execution Crying or Very sad, so I often copy/paste into an editor so I can review it.
View user's profileFind all posts by plugnplaySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
did you try Ctrl+F7 (Eval/Modify)?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Thanks, Dmitri. I have not customised any of my IDE Shortcuts, but have found Ctrl+F7 was duplicated for both Find Usage and Eval/Modify, so it was always doing Find Usage. I've redefined the key press, so now it works correctly.

It does have the advantage that long values wrap in the window (Immediate does not) but it sitll clears with each run. When doing comparisons of variable values between separate runs, or having typed a more complex evaluation string, it would be nice to have the previous output remain.
View user's profileFind all posts by plugnplaySend private message


Joined: 14 Jun 2013
Posts: 4
Reply with quote
CTRL-F7 (Evaluate/Modify) does not copy the data, only the variable name. I want both. How do I get to the Immediate screen? I cannot find anything in the help screen about this.
View user's profileFind all posts by procheckSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
You can turn on Immediate by going to the menu View > Debug Windows > Immediate. If you want to see the Immediate window both before and after debugging, I think you need to choose that option both in debug and non-debug mode, because each mode remembers your view settings. When you start a debug run, the Immediate panel clears, which I find annoying; wish it had an option to not clear. You can type most PHP statements and expressions into Immediate and they will display the corresponding output.
View user's profileFind all posts by plugnplaySend private message


Joined: 14 Jun 2013
Posts: 4
Reply with quote
Sorry to take so long to respond. I was busy setting up a new website. Your suggestion was exactly what I wanted.
Thanks very much!
View user's profileFind all posts by procheckSend private message
Copy Variable data
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic