adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.64k forks source link

ALL file contents were erased. #13605

Open scotty2541 opened 7 years ago

scotty2541 commented 7 years ago

I download and installed. Brand new install. Release 1.10 build 1.10.0-17483 (release 024bee940) build timestamp: Wed Jul 05 2017 07:39:31 GMT+0100

I started coding. Then I pulled up the Chrome Dev tools thinking I could debug JS. Well, I was wrong. Then I looked at extensions. But I didn't install any. I closed it.

The my "live" chrome stopped working. So I closed Chrome, then closed Brackets.

It asked if I wanted to save my file. I didn't think I had changed anything, but I answered yes.

I reopened Brackets... and ALL my files are ZERO LENGTH. Files are there on disk, but their contents WERE COMPLETELY GUTTED.

Thank you for destroying 2 hours of work.

petetnt commented 7 years ago

Sorry about that @scotty2541,

if you can point out exact replication methods for what happened to you that would be very helpful.

Again, sorry for the lost work.

scotty2541 commented 7 years ago

As I listed, and I will list it again... Going from memory, with as much detail as I can muster.

  1. Download the installer and install it.

  2. Run the program.

  3. Point it to a brand new directory.

  4. Start creating a site.

  5. Launch the Chrome "live view" (or whatever it's called).

  6. Create a CSS folder outside of Brackets (in Windows explorer)

  7. Copy in a CSS file.

  8. Edit it... see the changes occurring.

  9. Create a PHP folder in Brackets.., but it can only be created inside the CSS folder, because the "new directory" option doesn't seem to appear anywhere at the root level, only in sub folders.

  10. Drag the PHP folder to the root level

  11. Create an JS folder outside of Brackets.

  12. Add a JS file (I don't recall how I did the "new file" )

  13. Open the JS file in Brackets and add one small function.

  14. Modify the index.hml to call the function on a button press.

  15. Try running the code, the JS doesn't work.

  16. Open a different instance of Chrome

  17. Search for "js debugging in Brackets"... read some hits.

  18. Bring up the "developer Tools" in Brackets.

  19. Realize that apparently the "Developer Tools" is for troubleshooting Brackets, not for your code.

  20. Close "Developer Tools"

  21. Hunt for, and open the "extensions".

  22. Search for something about JS debugging.

  23. Decide not to install any extensions, close the extension window.

  24. Go back and make a changes to the code.

  25. Learn that there are two file windows on the left: the top list which you've been working with, and the bottom where the folder tree is displayed. So start closing the ones listed on top left, to reduce clutter.

  26. (Here is where I'm a little vague on remembering how many times I did this).

  27. See that Chrome is NOT updating when you make changes.

  28. Close chrome, and relaunch it.

  29. See that it's not updating.

  30. Close chrome, and see a message something about Live Update stopped working.

  31. (Then, this is exactly what happened)

  32. Close Brackets... it asks if you want to save your file.

  33. stop and think.... isn't already saved?? It's like everything is auto-saving because it appears automatically in the live update. And the Chrome URL shows it's connected to a server somewhere. And there is no ToolBar button to save quickly.

  34. Press yes.

  35. Brackets closes.

  36. Start Brackets.

  37. See that it reopened the same directory, and every file that was being edited is not empty. Zero bytes. Except the "index.html" which has a template in it (But was originally created in that folder outside Brackets, not created by brackets.)

  38. Get really angry about losing hours of work, and learning to use a new package... that erases your code. Write a batch file that you can click easy and fast which does a quick little "xcopy" to backup your whole dev tree (domain) to protect you.

Logically, the thing decided that these files were dirty and needed to save them. But the contents in memory were nothing so it simply stored and truncated all my files to nothing. At least, all the files that were in the top left file list, which was pretty much every file except a JPG image. (The JPEG image did not get destroyed). Unless it over wrote them when I closed them at step 25, and didn't prompt me to save. However I believe the live update was still working, so I suspect the files contents were still intact.

I rebuilt everything again, and use my batch file often. When I tried to exit, it again asked if I want to save the file (I don't think it's tell me which, I guess I have to read it's mind). It was VERY scary seeing that again, knowing what it did. I cancelled, and saved using the menu. Then exited, and it didn't prompt me to save that time.