Skip navigation
marsonmao
Currently Being Moderated

Relative path in .fla file cause debugger not working?

May 3, 2012 7:41 PM

Tags: #debug #flash_cs4

Hi:

I've tried debuggers in Flash CS4 and FlashDevelop, both are not working due to relative path set in .fla file's publish setting.
(File --> Publish setting --> Flash tab --> Script(S): ActionScript 3.0, press Setting --> set relative file path for source paths)
(I'm using Chinese version of Flash CS4 so wordings might be wrong)

 

My folder structure is like this:

Z:/aaaa/bbbb/cccc/flafolder/flaishere.fla
Z
:/aaaa/bbbb/cccc/asfolder1/asishere1.as

My package is cccc.asfolder1.asishere1.

So I set ../.. in .fla file to locate cccc folder.
(from flaishere.fla, and go back 2 levels, then arrives at cccc folder)

But when I debug in FlashDevelop, all my break points set in asishere1.as are not triggered.
I found the reason is that:
the debugger is supposed to debug Z:/aaaa/bbbb/cccc/asfolder1/asishere1.as(#1), but it debugs Z:/aaaa/bbbb/cccc/../cccc/asfolder1/asishere1.as(#2) instead.
So, it tries to debug in (#2), but there is no BPs set in(#2), so nothing happens.

I found this by clicking error message in stack frame, and it opens a second asishere1.as in my IDE.
I move the mouse cursor on the tab and it shows the file path as (#2).

The problem could be solved if I use absolute file path in .fla file, i.e. replace ../.. byZ:/aaaa/bbbb, but my project should be portable so I still want to try relative path.

The same problem appears in Flash CS4, all break points are useless unless I set absolute file path.
If you click error message in stack frame of Flash CS4, it will open a file, it should be (#2) but the path shown is the same as (#1), so it's harder to notice this problem,
All you can see is the debugger is not stopping on break points.

 

Any way to solve this? Thanks!

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points