Add or Rename or Remove file when debugger is running

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Add or Rename or Remove file when debugger is running

Postby fantasticjamieburns » January 17th, 2013, 11:39 am

Hello again,

One thing I keep bumping into is that when I have the debugger running I cannot Add or Rename or Remove files. I tend to leave the debugger on and flip back and forth making small changes etc. and don't like to constantly stop and start the debugger.

I realise in compiled languages why the restrictions exist, but PHP is not compiled before debugging.

Is there a way to remove this behaviour for PHP?

Jamie.
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am

Re: Add or Rename or Remove file when debugger is running

Postby CFI » January 17th, 2013, 12:00 pm

I can't tell you about adding/removing files (IMO thats a bad idea at all, but I am comming from compiled langueges), but editing files is no problem.
But I guess that is a Visual Studio behavior as it is normaly not possible as you already mentioned...
CFI
 
Posts: 66
Joined: December 13th, 2012, 1:29 pm

Re: Add or Rename or Remove file when debugger is running

Postby Miloslav Beno » January 17th, 2013, 4:41 pm

Hi there,

Yes, this restriction comes from Visual Studio default behaviour when in debug mode. It's not something we've introduced on purpose. But I'll take a look if there's something we could do about it, because it's just limitation for compiled languages.

Thanks for suggestion!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Add or Rename or Remove file when debugger is running

Postby fantasticjamieburns » January 17th, 2013, 11:17 pm

Thanks for looking into it - I do think it would be more in line with PHP development workflows using other systems (and so easier for people to migrate from other products).

CFI:
To be honest this annoys me when developing in C# too!
I would like to be able to add/remove files and have the project be rebuilt for me and loaded into the debugger (or a setting to explicitly allow this). But it certainly is harder for compiled as they have lots of work to do to get loaded.

:roll:
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am

Re: Add or Rename or Remove file when debugger is running

Postby CFI » January 18th, 2013, 8:21 am

fantasticjamieburns wrote:To be honest this annoys me when developing in C# too!
I would like to be able to add/remove files and have the project be rebuilt for me and loaded into the debugger (or a setting to explicitly allow this). But it certainly is harder for compiled as they have lots of work to do to get loaded.

Think about that:
That is nearly IMPOSSIBLE as the debugger would need to remember EVERY action which was executed since starting the application (=SLOW) and redo them to get you to the same step agan after recompilation (CAN be VERY long - imagine you are debugging for 10-15min already)...
CFI
 
Posts: 66
Joined: December 13th, 2012, 1:29 pm

Re: Add or Rename or Remove file when debugger is running

Postby fantasticjamieburns » January 19th, 2013, 2:43 pm

** Just chatting about C# for those reading this bit of the post is not about PHP :geek:

It is not impossible (and does't require replaying commands).

It already happens with:

- Visual Studio's "Edit and Continue" feature
- Code in App_Code which can be changed at runtime
- Razor view engine

It is just that for whatever reason you cannot add/remove classes or methods outside of App_Code and the UI removes the options.
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am

Re: Add or Rename or Remove file when debugger is running

Postby Miloslav Beno » January 19th, 2013, 2:50 pm

Hi there,

Just information about PHP Tools. We've made the modification so this will be possible in 1.6 release for local debugging. For remote it won't be possible for now for publishing reasons.

Thanks
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Add or Rename or Remove file when debugger is running

Postby CFI » January 21st, 2013, 8:22 am

** Just chatting about C# for those reading this bit of the post is not about PHP

But not even there everything can be changed. E.g. Lambda-Expressions can't be changed.
If you dig deeper into how the .net-FW and JIT works this makes also sense. You can only change "stuff" which is "JIT"-compiled and/or values stored in memory, but not things generated at compile time (like Lambdas, anonymous types/classes,...).
CFI
 
Posts: 66
Joined: December 13th, 2012, 1:29 pm

Re: Add or Rename or Remove file when debugger is running

Postby fantasticjamieburns » January 21st, 2013, 5:03 pm

@Miloslav - Thanks!
fantasticjamieburns
 
Posts: 44
Joined: September 10th, 2012, 10:33 am


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 41 guests

cron

User Control Panel

Login

Who is online

In total there are 41 users online :: 0 registered, 0 hidden and 41 guests (based on users active over the past 5 minutes)
Most users ever online was 287 on March 29th, 2024, 6:11 am

Users browsing this forum: No registered users and 41 guests