Code is working in keil ide debugging mode but not when i upload it to mcu

when i upload my code to mcu it doesnt work but when i use debugger mode it works properly why is that happening ?