The debug build that would not go away

Drag your script into the OS X build settings, make sure it is before build.

The script will delete the debug build before running, so you can run.

But it won’t delete it afterward, so it will still appear on your disk.

@Dante: please check your autocorrect. The IT-Abteilung surely is something different.

The script needs to be placed BEFORE the build step. Try the “rm” first to make sure that the files are deleted and that the correct files are deleted. The only time I get problems with the script if I have a helper app inside the main app which is still running.

IT-Abteilung should be it instead of IT-Abteilung

i put it before build but it doesn’t want to work, i still have to work with the Automator for mac

how can i use the “rm” function?
in the terminal?

Dante: “doesn’t work” isn’t really good as description.

Try with "rm -rf " in the Terminal. Then drag the folder of your app to the Terminal. Hit return.

If that doesn’t work your script can’t work either. If this works put a “print theCommand” into the script and check that the path is the same as in Terminal.

Another idea: Automator basically is AppleScript. With the osascript shell command you can do the AppleScript in the IDE, too.

The issue is that a Web app has a different directory structure. I am working on it.

OK. Here is the script for a Mac web app :

[code] dim dbg as String
if debugBuild then dbg = “.debug”
dim appNameForShell as string
appNameForShell = PropertyValue(“App.MacOSXAppName”) + dbg
appNameForShell = replaceall(appNameForShell, " ", "\ ")

dim CountSlashes as Integer = CountFields(ProjectShellPath, “/”)
dim ProjectName as string = NthField(ProjectShellPath, “/”, CountSlashes)
dim ProjectPath as String = Left(ProjectShellPath, Len(ProjectShellPath) - Len(ProjectName))

dim theCommand as String
theCommand = “rm -rf " + ProjectPath+appNameForShell+”.debug"

dim theResult as String
theResult = DoShellCommand(theCommand)
if theResult <> “” then print theResult

function getShellString(theString as String) as string
Return ReplaceAll(theString, " ", "\ ")
end Function[/code]

I’ve had this issue on and off for years. Beatrix’s script doesn’t always seem to work, not sure why but might be that the shell script isn’t allowed to remove the file. My best work around has been to get the sccipt to detect the .debug is still there, pausing the build script, then manually delete the file in finder before continuing with the script. At least that way the debugger doesn’t exit, causing you to wait while everything recompiled on the next run.

@Beatrix Willius @Michel Bujardet Thank you,
after the terminal command and the change of script it works just fine naw
Tank you very much <3